summaryrefslogtreecommitdiffstats
path: root/Alc/alsa.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-05-03 17:11:07 -0700
committerChris Robinson <[email protected]>2011-05-03 17:11:07 -0700
commit679f2480c9a66905b0a03c99e099b59bfd07879d (patch)
tree186219bf7fc0b39eba0f04b2e4ede23c57a57260 /Alc/alsa.c
parentdb7ca2c7ca48026261c59095331ae2a098083c7a (diff)
Add a device flag for channel config requests
Diffstat (limited to 'Alc/alsa.c')
-rw-r--r--Alc/alsa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Alc/alsa.c b/Alc/alsa.c
index 500ab13b..2a3d55ec 100644
--- a/Alc/alsa.c
+++ b/Alc/alsa.c
@@ -612,7 +612,12 @@ static ALCboolean alsa_reset_playback(ALCdevice *device)
device->FmtChans = DevFmtMono;
if((i=psnd_pcm_hw_params_set_channels(data->pcmHandle, p, 1)) < 0)
err = "set channels";
+ else if((device->Flags&DEVICE_CHANNELS_REQUEST))
+ AL_PRINT("Failed to set requested channel config %#x, got mono instead\n", device->FmtChans);
}
+ else if((device->Flags&DEVICE_CHANNELS_REQUEST))
+ AL_PRINT("Failed to set requested channel config %#x, got stereo instead\n", device->FmtChans);
+ device->Flags &= ~DEVICE_CHANNELS_REQUEST;
}
if(i >= 0 && (i=psnd_pcm_hw_params_set_rate_resample(data->pcmHandle, p, 0)) < 0)
{