Johannes,
Do you get it to work stable on your vxPocket?
Yes, very stable. No crashes.
I'm afraid pd-asio is not using the native asio driver, but the directsound or mme wrapper. Where can I change this?
In pa_asio.cpp change sDefault[Input/Output]Device to be the index of the native ASIO driver. PortAudio prints information on all available drivers when PD starts so just count from 0 to the driver you want PD to use. In my system, it is 2.
static int sDefaultOutputDeviceID = 0; static int sDefaultInputDeviceID = 0;
changed to:
static int sDefaultOutputDeviceID = 2; static int sDefaultInputDeviceID = 2;
The other thing to look at is pablio.c, make sure that numFrames is reasonable. I print these out so I can see what's going on at run-time:
In OpenAudioStream(...){ ...
minNumBuffers = Pa_GetMinNumBuffers( FRAMES_PER_BUFFER, sampleRate ); numFrames = minNumBuffers * FRAMES_PER_BUFFER; numFrames = RoundUpToNextPowerOf2( numFrames ); printf("\nFramesPerBuffer :%d\n", (int)FRAMES_PER_BUFFER); printf("minNumBuffers :%d\n", minNumBuffers); ... }
These are the main parameters that control ASIO buffering from PortAudio.
Good luck,
Mike
Johannes,
Perhaps the current output buffer is emptying before PD can fill the next buffer, this might be causing the broken sound.
Yes, that'll be the problem. I recorded some output of pd digitally, and I can confirm endianess is not a problem. My previous remark about stability was based on the assumption that it was an endianess-problem.
To fix, try increasing the buffer size...
Right, that helps in some cases.
This parameter will be dependent on the specific sound card. (126) works for a digigram VX pocket because that's the buffer granularity. Such low latencies work with simple patches, for more computationally intensive patches (252 / 256) or (504 / 512) are necessary.
I guess this 126-samples buffer is specific for the vxPocket?
What I notice that on one PC the ASIO direct sound driver warns that it cannot do full-duplex, and the ASIO multimedia configuration test dialog pops up, when I start PD.
thanks, Johannes