Remove global state and add mic hot swapping

This commit is contained in:
James Rowe 2019-03-06 20:59:58 -07:00
parent 182d672c15
commit f5df13eb24
6 changed files with 71 additions and 52 deletions

View file

@ -46,8 +46,10 @@ public:
*/
virtual Samples Read() = 0;
/// Adjusts the Parameters. Implementations should update the parameters field in addition to
/// changing the mic to sample according to the new parameters. Called by Core
/**
* Adjusts the Parameters. Implementations should update the parameters field in addition to
* changing the mic to sample according to the new parameters. Called by Core
*/
virtual void AdjustSampleRate(u32 sample_rate) = 0;
/// Value from 0 - 100 to adjust the mic gain setting. Called by Core
@ -111,8 +113,4 @@ private:
std::vector<u8> CACHE_16_BIT;
};
void RegisterMic(std::shared_ptr<Mic::Interface> mic);
std::shared_ptr<Mic::Interface> GetCurrentMic();
} // namespace Frontend::Mic