Skip to content

Commit

Permalink
Expose the audio frequency to calling apps.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jun 11, 2011
1 parent 9635337 commit 4e17d25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions theoraplay.c
Expand Up @@ -244,6 +244,7 @@ static void WorkerThread(TheoraDecoder *ctx)
if (item == NULL) goto cleanup;
item->playms = (unsigned long) ((((double) audioframes) / ((double) vinfo.rate)) * 1000.0);
item->channels = channels;
item->freq = vinfo.rate;
item->frames = frames;
item->samples = (float *) malloc(sizeof (float) * frames * channels);
item->next = NULL;
Expand Down
1 change: 1 addition & 0 deletions theoraplay.h
Expand Up @@ -28,6 +28,7 @@ typedef struct THEORAPLAY_PcmAudioItem
{
unsigned int playms; // playback start time in milliseconds.
int channels;
int freq;
int frames;
float *samples; // frames * channels float32 samples.
struct THEORAPLAY_PcmAudioItem *next;
Expand Down

0 comments on commit 4e17d25

Please sign in to comment.