AmAudioMixIn.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00028 #ifndef _AM_AUDIO_MIX_IN_H
00029 #define _AM_AUDIO_MIX_IN_H
00030
00031 #include "AmAudio.h"
00032 #include "AmAudioFile.h"
00033
00034
00035 #define MAX_PACKETLENGTH_MS 30
00036 #define MAX_BUF_SAMPLES 8000 * MAX_PACKETLENGTH_MS / 1000
00037 #define DEFAULT_SAMPLE_RATE 8000 // eh...
00038
00049 class AmAudioMixIn : public AmAudio {
00050 AmAudio* A;
00051 AmAudioFile* B;
00052 unsigned int s;
00053 double l;
00054 bool finish_b_while_mixing;
00055
00056 bool mixing;
00057
00058 unsigned int next_start_ts;
00059 bool next_start_ts_i;
00060
00061 short mix_buf[MAX_BUF_SAMPLES];
00062
00063
00064 public:
00065 AmAudioMixIn(AmAudio* A, AmAudioFile* B,
00066 unsigned int s, double l,
00067 bool finish_b_while_mixing = false);
00068 ~AmAudioMixIn();
00069 protected:
00070
00071 int read(unsigned int user_ts, unsigned int size){ return -1; }
00072 int write(unsigned int user_ts, unsigned int size){ return -1; }
00073
00074
00075 int get(unsigned int user_ts, unsigned char* buffer, unsigned int nb_samples);
00076 int put(unsigned int user_ts, unsigned char* buffer, unsigned int size);
00077 };
00078
00079
00080 #endif // _AM_AUDIO_MIX_IN_H
Generated on Fri May 16 12:02:05 2008 for SEMS by
1.5.1