record_audio.cpp 506 B

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