Theora Playback Library
1.0.0
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
theoraplayer
include
theoraplayer
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
14
class
TheoraAudioInterface
;
18
struct
TheoraAudioPacket
19
{
20
float
*
pcm
;
21
int
numSamples
;
22
TheoraAudioPacket
*
next
;
// pointer to the next audio packet, to implement a linked list
23
};
24
28
class
TheoraPlayerExport
TheoraAudioPacketQueue
29
{
30
protected
:
31
unsigned
int
mAudioFrequency,
mNumAudioChannels
;
32
TheoraAudioPacket
*
mTheoraAudioPacketQueue
;
33
void
_addAudioPacket(
float
* data,
int
numSamples);
34
public
:
35
TheoraAudioPacketQueue
();
36
~
TheoraAudioPacketQueue
();
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
Generated by
1.8.3.1