AudioContext.cpp 947 B

12345678910111213141516171819202122232425262728293031323334
  1. #include "AudioContext.h"
  2. #include "WallpaperEngine/Audio/Drivers/AudioDriver.h"
  3. namespace WallpaperEngine::Audio {
  4. AudioContext::AudioContext (Drivers::AudioDriver& driver) : m_driver (driver) {}
  5. void AudioContext::addStream (AudioStream* stream) const {
  6. this->m_driver.addStream (stream);
  7. }
  8. AVSampleFormat AudioContext::getFormat () const {
  9. return this->m_driver.getFormat ();
  10. }
  11. int AudioContext::getSampleRate () const {
  12. return this->m_driver.getSampleRate ();
  13. }
  14. int AudioContext::getChannels () const {
  15. return this->m_driver.getChannels ();
  16. }
  17. Application::ApplicationContext& AudioContext::getApplicationContext () const {
  18. return this->m_driver.getApplicationContext ();
  19. }
  20. Drivers::Recorders::PlaybackRecorder& AudioContext::getRecorder () const {
  21. return this->m_driver.getRecorder ();
  22. }
  23. Drivers::AudioDriver& AudioContext::getDriver () const {
  24. return this->m_driver;
  25. }
  26. } // namespace WallpaperEngine::Audio