AudioCollector in python bindings

This commit is contained in:
Jaromil
2009-07-24 14:24:35 +02:00
parent e3d0b80584
commit bf8268b517
3 changed files with 9 additions and 4 deletions
+6 -1
View File
@@ -87,6 +87,8 @@ class RSSPlaylist(object):
self.callback = NextVideoCB()
self.audio = freej.AudioCollector('freej', 1024, 44100);
while (not self.cx.quit):
for file in self.rsssucker.list:
@@ -98,7 +100,10 @@ class RSSPlaylist(object):
self.lay.add_eos_call(self.callback)
self.lay.start()
self.cx.add_layer(self.lay)
self.scr.add_layer(self.lay)
self.scr.add_audio( self.audio.Jack )
while(not end_of_video): time.sleep(5)
print "end of video"
self.lay.quit = True
+1 -1
View File
@@ -83,7 +83,7 @@ void FFT::Impulse2Freq(float *imp, float *out)
///////////////////////////////////////////////////////////////////////////////////////////////////////////
AudioCollector::AudioCollector(const string &port, int n_BufferLength, unsigned int n_Samplerate, int FFTBuffers) :
AudioCollector::AudioCollector(char *port, int n_BufferLength, unsigned int n_Samplerate, int FFTBuffers) :
m_Gain(1),
m_SmoothingBias(1.2),
m_FFT(n_BufferLength),
+2 -2
View File
@@ -49,7 +49,7 @@ public:
class AudioCollector {
public:
AudioCollector(const string &port, int BufferLength, unsigned int Samplerate, int FFTBuffers = 1);
AudioCollector(char *port, int BufferLength, unsigned int Samplerate, int FFTBuffers = 1);
~AudioCollector();
float *GetFFT();
@@ -58,7 +58,7 @@ public:
bool IsConnected();
void SetGain(float s) { m_Gain=s; }
void SetSmoothingBias(float s) { if (s<2 && s>0) m_SmoothingBias=s; }
void Process(const string &filename);
// void Process(const string &filename);
bool IsProcessing() { return m_Processing; }
float BufferTime() { return m_BufferTime; }