libvorbis documentation | libvorbis version 1.3.2 - 20101101

# vorbis_granule_time

declared in "vorbis/codec.h";

This function converts a granule position to a time for a given Vorbis stream.

    extern double   vorbis_granule_time(vorbis_dsp_state *v,
                                        ogg_int64_t granulepos);

### Parameters

v
  Pointer to the vorbis_dsp_state for the stream.
granulepos
  The granule position.

### Return Values

> - The time (in seconds) corresponding to the granulepos.
> - -1 if the given granulepos is negative

copyright © 2010 Xiph.Org | Ogg Vorbis
libvorbis documentation | libvorbis version 1.3.2 - 20101101