mirror of
https://github.com/encounter/SDL.git
synced 2025-12-14 23:56:19 +00:00
adjust handling of iscapture
- drop iscapture parameter of OpenDevice - use SDL_bool for iscapture
This commit is contained in:
@@ -280,12 +280,13 @@ JACK_CloseDevice(_THIS)
|
||||
}
|
||||
|
||||
static int
|
||||
JACK_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
|
||||
JACK_OpenDevice(_THIS, void *handle, const char *devname)
|
||||
{
|
||||
/* Note that JACK uses "output" for capture devices (they output audio
|
||||
data to us) and "input" for playback (we input audio data to them).
|
||||
Likewise, SDL's playback port will be "output" (we write data out)
|
||||
and capture will be "input" (we read data in). */
|
||||
SDL_bool iscapture = this->iscapture;
|
||||
const unsigned long sysportflags = iscapture ? JackPortIsOutput : JackPortIsInput;
|
||||
const unsigned long sdlportflags = iscapture ? JackPortIsInput : JackPortIsOutput;
|
||||
const JackProcessCallback callback = iscapture ? jackProcessCaptureCallback : jackProcessPlaybackCallback;
|
||||
|
||||
Reference in New Issue
Block a user