2
queues audio frames in an IOQueue, allows streaming from frames
3
Copyright (C) 2001 Martin Vogt
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU Library General Public License as published by
7
the Free Software Foundation.
9
For more information look at the file COPYRIGHT in this package
15
#ifndef __AUDIOFRAMEQUE_H
16
#define __AUDIOFRAMEQUE_H
18
#include "IOFrameQueue.h"
19
#include "floatFrame.h"
25
This class solves the problem that we produce audioFrames
26
in a packet, but often we want that these packets looks
28
This class can convert from packets back to a stream.
31
class AudioFrameQueue : public IOFrameQueue {
35
AudioFrame* currentAudioFrame;
39
AudioFrameQueue(int queueSize,int frameSize,int frameType);
42
void emptyQueueEnqueue(AudioFrame* frame);
43
AudioFrame* emptyQueueDequeue();
45
void dataQueueEnqueue(AudioFrame* frame);
46
AudioFrame* dataQueueDequeue();
48
// Meta info about stream
49
AudioFrame* getCurrent();
51
// Data info about "stream" (calculated from the packets)
54
// copy from packets to destination
55
int copy(float* left,float* right,int len);
56
int copy(short int* left,short int* right,int len);
57
void forwardStreamDouble(int len);
59
int copy(short int* dest,int len);
60
int copy(float* dest,int len);
61
void forwardStreamSingle(int len);
66
void transferFrame(float* left,float* right,FloatFrame*,int start,int len);
67
void transferFrame(short int* left,short int* right,
68
PCMFrame*,int start,int len);
69
void transferFrame(short int* dest,
70
PCMFrame*,int start,int len);
71
void transferFrame(float* dest,
72
FloatFrame*,int start,int len);
73
int copygeneric(char* left,char* right,int wantLen,int version);