Theora Playback Library  1.0.0
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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.sourceforge.net/
4 *************************************************************************************
5 Copyright (c) 2008-2013 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://www.opensource.org/licenses/bsd-license.php
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