On Tuesday 10 August 2010 23:18:02 Bill Good wrote:
> Admittedly I haven't actually tried it yet. As long as it doesn't cause the
> whole engine to hang (and xrun), I don't see that as really being an issue.
> I suppose I'll find out soon enough, if it doesn't work (i.e. causes an
> audio xrun), it's probably a bug.
> 
I've got this all working, although there are some crummy glitches (not xruns 
though). Switching from linear -> soundtouch will produce a glitch pretty much 
100% of the time, and the other direction probably about 60%. It sounds a lot 
like buffers in the scalars aren't being invalidated when the switch occurs (as 
they should be, to keep from playing old samples at the next 
enginebufferscale::scale call). Anyone have any ideas on this? The code I'm 
using is as follows:
void EngineBuffer::process(blah)
{
    // comments
    CSAMPLE * pOutput = (CSAMPLE *)pOut;
    bool bCurBufferPaused = false;
    // FYI m_pKeylock is a ControlPushButton
    if (m_pKeylock->get() && m_pScale != m_pScaleST) {
        setPitchIndpTimeStretch(true);
    } else if (!m_pKeylock->get() && m_pScale == m_pScaleST) {
        setPitchIndpTimeStretch(false);
    }
    // and the rest of ::process
    // ...
}
I may also need to set enginebuffer::m_resetPITS (or whatever that variable's 
called) to false, so if the user un-clicks the key-lock button while 
scratching or whatever, it won't go back to PITS (stupid corner-case but might 
as well account for it).

Other than that, it's actually surprisingly smooth for something I'm guessing 
hasn't really been tried in the past.

I've made buttons but they're horrible. If anyone more familiar with 
outline/image editing in general than me wants to have a go at it, please do. 
I'm just making a regular size button, just above the volume faders, next to 
flanger and beneath PFL/headphones.

Bill

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to