> PortAudio wrote
> Before making any other calls to PortAudio, you 'must' call Pa_Initialize().
> It seems you call before Pa_GetDefaultOutputDevice.
Sorry but I dont understand.
Pa_Initialize() is called before
Pa_GetDefaultOutputDevice() in uos code:
{$IF DEFINED(portaudio)}
if (uosLoadResult.PAloadERROR = 0) then
begin
uosLoadResult.PAinitError := Pa_Initialize();
paversion := UTF8Decode(Pa_GetVersionText());
if uosLoadResult.PAinitError = 0 then
begin
Result := 0;
DefDevInInfo := Nil ;
DefDevOutInfo := Nil ;
DefDevOut := Pa_GetDefaultOutputDevice();
if DefDevOut >= 0 then
DefDevOutInfo := Pa_GetDeviceInfo(DefDevOut);
if DefDevOutInfo <> nil then
DefDevOutAPIInfo := Pa_GetHostApiInfo(DefDevOutInfo^.hostApi);
DefDevIn := Pa_GetDefaultInputDevice();
if DefDevIn >= 0 then
DefDevInInfo := Pa_GetDeviceInfo(DefDevIn);
if DefDevInInfo <> nil then
DefDevInAPIInfo := Pa_GetHostApiInfo(DefDevInInfo^.hostApi);
end;
end;
{$endif}
At least it is how they do in their C examples.