Example #1
0
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    AudioRecorder recorder;
    recorder.show();

    return app.exec();
}
Example #2
0
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    app.setWindowIcon(QIcon("enf.png"));

    AudioRecorder recorder;
    recorder.show();

    return app.exec();
}
int AudioRecorder::audio_callback(const void * inputBuffer,
                                  void *outputBuffer,
                                  unsigned long framesPerBuffer,
                                  const PaStreamCallbackTimeInfo* timeInfo,
                                  PaStreamCallbackFlags statusFlags,
                                  void *user_data)
{
  AudioRecorder* a = static_cast<AudioRecorder*>(user_data);
  return a->audio_callback_m(inputBuffer, outputBuffer, framesPerBuffer,
                                       timeInfo, statusFlags, user_data);
}
Example #4
0
int _tmain(int argc, _TCHAR* argv[])
{
	vector<AudioRecorderDevice> devs;
	AudioRecorder::enumAudioRecorders(devs);
	assert(devs.size() > 0);
	AudioRecorder ar;
	//ar.setCallback(recordcallback, NULL);
	int channels = 2, sampleRate = 44100, bits = 16;
	ar.openDevice(devs[0], channels, sampleRate, bits);
	printf("channels: %d, sampleRate: %d, bits: %d\n", channels, sampleRate, bits);
	ar.startRecord();
	while(1)
	{
		if('q' == getchar())
		{
			break;
		}
	}
	return 0;
}
Example #5
0
static UINT __stdcall CaptureTheadProc(LPVOID param)
{
	AudioRecorder *pRecorder = (AudioRecorder*)param;
	return pRecorder->Capture();
}
void AudioRecorder::finished_callback(void* user_data)
{
  AudioRecorder* a = static_cast<AudioRecorder*>(user_data);
  a->finished_callback_m(user_data);
}