record_audio.cpp 574 B

1234567891011121314151617181920212223242526
  1. #include "record_audio.h"
  2. #include "headers_ffmpeg.h"
  3. namespace am {
  4. record_audio::record_audio()
  5. {
  6. _running = false;
  7. _inited = false;
  8. _paused = false;
  9. _sample_rate = 48000;
  10. _bit_rate = 3072000;
  11. _channel_num = 2;
  12. _channel_layout = ffmpeg_get_default_channel_layout(_channel_num);
  13. _bit_per_sample = _bit_rate / _sample_rate / _channel_num;
  14. _fmt = AV_SAMPLE_FMT_FLT;
  15. _on_data = nullptr;
  16. _on_error = nullptr;
  17. _device_name = "";
  18. _device_id = "";
  19. _is_input = false;
  20. }
  21. record_audio::~record_audio() {}
  22. } // namespace am