< prev index next >
src/solaris/native/com/sun/media/sound/PLATFORM_API_SolarisOS_PCM.c
Print this page
rev 1553 : 8157753: Audio replay enhancement
Reviewed-by: prr
*** 180,189 ****
--- 180,193 ----
TRACE0("> DAUDIO_Open\n");
if (encoding != DAUDIO_PCM) {
ERROR1(" DAUDIO_Open: invalid encoding %d\n", (int) encoding);
return NULL;
}
+ if (channels <= 0) {
+ ERROR1(" DAUDIO_Open: Invalid number of channels=%d!\n", channels);
+ return NULL;
+ }
info = (SolPcmInfo*) malloc(sizeof(SolPcmInfo));
if (!info) {
ERROR0("Out of memory\n");
return NULL;
< prev index next >