Theora Playback Library  1.1.0
TheoraAudioPacketQueue.h
Go to the documentation of this file.
1 /************************************************************************************
2 This source file is part of the Theora Video Playback Library
3 For latest info, see http://libtheoraplayer.googlecode.com
4 *************************************************************************************
5 Copyright (c) 2008-2014 Kresimir Spes (kspes@cateia.com)
6 This program is free software; you can redistribute it and/or modify it under
7 the terms of the BSD license: http://opensource.org/licenses/BSD-3-Clause
8 *************************************************************************************/
9 #ifndef _TheoraAudioPacketQueue_h
10 #define _TheoraAudioPacketQueue_h
11 
12 #include "TheoraExport.h"
13 
19 {
20  float* pcm;
21  int numSamples;
22  TheoraAudioPacket* next; // pointer to the next audio packet, to implement a linked list
23 };
24 
29 {
30 protected:
31  unsigned int mAudioFrequency, mNumAudioChannels;
33  void _addAudioPacket(float* data, int numSamples);
34 public:
37 
38  float getAudioPacketQueueLength();
39  void addAudioPacket(float** buffer, int numSamples, float gain);
40  void addAudioPacket(float* buffer, int numSamples, float gain);
41  TheoraAudioPacket* popAudioPacket();
42  void destroyAudioPacket(TheoraAudioPacket* p);
43  void destroyAllAudioPackets();
44 
45  void flushAudioPackets(TheoraAudioInterface* audioInterface);
46 };
47 
48 #endif
TheoraAudioPacket * next
size in number of float samples (stereo has twice the number of samples)
Definition: TheoraAudioPacketQueue.h:22
TheoraAudioPacket * mTheoraAudioPacketQueue
Definition: TheoraAudioPacketQueue.h:32
Definition: TheoraAudioPacketQueue.h:18
int numSamples
Definition: TheoraAudioPacketQueue.h:21
Definition: TheoraAudioPacketQueue.h:28
unsigned int mNumAudioChannels
Definition: TheoraAudioPacketQueue.h:31
#define TheoraPlayerExport
Definition: TheoraExport.h:25
Definition: TheoraAudioInterface.h:22
float * pcm
Definition: TheoraAudioPacketQueue.h:20