INTERACT FORUM

Windows => Plug-in Development => Topic started by: Gridstop on October 04, 2004, 07:15:04 pm

Title: Easy way to detect sample rate/changes in sample rate?
Post by: Gridstop on October 04, 2004, 07:15:04 pm
Hello,

My situation is, I need to detect changes in the sample rate of audio being played back.

This is because, I am intending to use MC with an external audio system that has a global master clock. The computer's sound card syncs to this external master clock. So, if MC changes sample rates (ie, we were playing a 44.1khz CD, and now it is time to play some 48 or 96 khz) the master clock must change.

Basically, I just need to detect when a new track starts, check and see if we are changing the sample rate, and if so send a few bytes out the serial port, no big deal really. Although if there were some way to 'lock' MC for an instant, to give time for the soundcard to synch to the new signal, that would be IDEAL. If it's not possible, having some slight corruption in the first instant after changing sample rates isn't a big deal, as it shouldn't really happen too often.

Any idea on what sort of plugin to use? Or how complex this will be?

Thanks for any ideas/help!
Title: Re:Easy way to detect sample rate/changes in sample rate?
Post by: Matt on October 08, 2004, 11:20:44 am
MC 11 has super high-quality resampling.  Could you just lock the output samplerate in DSP Studio?
Title: Re:Easy way to detect sample rate/changes in sample rate?
Post by: Gridstop on October 09, 2004, 02:13:03 am
Unfortunately that's not really an option as bit-perfect ripping to FLAC and then playback is pretty important to me. Lots of sources have to be played back at 44.1 to work right, and I still want to be able to play 96khz recording as well.

Is there any way to write a plugin that would be able to read the current sample-rate? Even something wacky like a visualization?