mirror of
https://github.com/dyne/FreeJ.git
synced 2026-06-16 12:59:33 +02:00
AudioCollector in python bindings
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user