[Loopdub-devel] Sample Rate Configuration
Brought to you by:
radarsat1
From: Nick T. <nh...@gm...> - 2008-01-02 10:52:54
|
The attached patch adds two new configuration parameters to .loopdub.conf: HardwareSampleRate and InternalSampleRate. HardwareSampleRate is the sample rate used for the audio output; it corresponds to Player::m_nHwSampleRate. InternalSampleRate is the sample rate used for internal processing; it corresponds to the new static variable Player::m_nSampleRate, which replaces the old SAMPLE_RATE constant defined in player.h. The motivation for HardwareSampleRate is to allow the user to choose a sample rate other than 48000Hz, which was previously hard-coded. The motivation for InternalSampleRate is to allow the user to configure LoopDub to choose a sample rate that matches their hardware sample rate; or, alternately, one that matches the sample rate of their loop files, if these two sample rates do not match. It is arguable that InternalSampleRate and HardwareSampleRate should be merged; that is, that they should always be the same. The advantage would be increased simplicity (both in the code and from the user's perspective); the disadvantage would be decreased flexibility. What do you think? |