Support for QNX 7.0 (thanks, Elad!).

Fixes Bugzilla #3686.
This commit is contained in:
Ryan C. Gordon 2017-07-01 17:50:47 -04:00
parent 35b983c052
commit 14c4ea3981
11 changed files with 875 additions and 5 deletions

View file

@ -205,6 +205,7 @@ extern AudioBootStrap FUSIONSOUND_bootstrap;
extern AudioBootStrap ANDROIDAUDIO_bootstrap;
extern AudioBootStrap PSPAUDIO_bootstrap;
extern AudioBootStrap EMSCRIPTENAUDIO_bootstrap;
extern AudioBootStrap QNX_bootstrap;
#endif /* SDL_sysaudio_h_ */

View file

@ -370,13 +370,13 @@ QSA_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
this->hidden->cardno = device->cardno;
status = snd_pcm_open(&this->hidden->audio_handle,
device->cardno, device->deviceno,
iscapture ? SND_PCM_OPEN_PLAYBACK : SND_PCM_OPEN_CAPTURE);
iscapture ? SND_PCM_OPEN_CAPTURE : SND_PCM_OPEN_PLAYBACK);
} else {
/* Open system default audio device */
status = snd_pcm_open_preferred(&this->hidden->audio_handle,
&this->hidden->cardno,
&this->hidden->deviceno,
iscapture ? SND_PCM_OPEN_PLAYBACK : SND_PCM_OPEN_CAPTURE);
iscapture ? SND_PCM_OPEN_CAPTURE : SND_PCM_OPEN_PLAYBACK);
}
/* Check if requested device is opened */
@ -385,6 +385,7 @@ QSA_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
return QSA_SetError("snd_pcm_open", status);
}
#if 0
if (!QSA_CheckBuggyCards(this, QSA_MMAP_WORKAROUND)) {
/* Disable QSA MMAP plugin for buggy audio drivers */
status =
@ -394,6 +395,7 @@ QSA_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
return QSA_SetError("snd_pcm_plugin_set_disable", status);
}
}
#endif
/* Try for a closest match on audio format */
format = 0;