8157753: Audio replay enhancement
Reviewed-by: amenkov, prr, mschoene
This commit is contained in:
parent
b40f7ccf8e
commit
8fbf862835
@ -817,6 +817,10 @@ void* DAUDIO_Open(INT32 mixerIndex, INT32 deviceID, int isSource,
|
|||||||
ERROR1("<<DAUDIO_Open: ERROR: unsupported encoding (%d)\n", encoding);
|
ERROR1("<<DAUDIO_Open: ERROR: unsupported encoding (%d)\n", encoding);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
if (channels <= 0) {
|
||||||
|
ERROR1("<<DAUDIO_Open: ERROR: Invalid number of channels=%d!\n", channels);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
OSX_DirectAudioDevice *device = new OSX_DirectAudioDevice();
|
OSX_DirectAudioDevice *device = new OSX_DirectAudioDevice();
|
||||||
|
|
||||||
|
@ -434,7 +434,10 @@ void* DAUDIO_Open(INT32 mixerIndex, INT32 deviceID, int isSource,
|
|||||||
snd_output_stdio_attach(&ALSA_OUTPUT, stdout, 0);
|
snd_output_stdio_attach(&ALSA_OUTPUT, stdout, 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (channels <= 0) {
|
||||||
|
ERROR1("ERROR: Invalid number of channels=%d!\n", channels);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
info = (AlsaPcmInfo*) malloc(sizeof(AlsaPcmInfo));
|
info = (AlsaPcmInfo*) malloc(sizeof(AlsaPcmInfo));
|
||||||
if (!info) {
|
if (!info) {
|
||||||
ERROR0("Out of memory\n");
|
ERROR0("Out of memory\n");
|
||||||
|
@ -434,7 +434,10 @@ void* DAUDIO_Open(INT32 mixerIndex, INT32 deviceID, int isSource,
|
|||||||
snd_output_stdio_attach(&ALSA_OUTPUT, stdout, 0);
|
snd_output_stdio_attach(&ALSA_OUTPUT, stdout, 0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (channels <= 0) {
|
||||||
|
ERROR1("ERROR: Invalid number of channels=%d!\n", channels);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
info = (AlsaPcmInfo*) malloc(sizeof(AlsaPcmInfo));
|
info = (AlsaPcmInfo*) malloc(sizeof(AlsaPcmInfo));
|
||||||
if (!info) {
|
if (!info) {
|
||||||
ERROR0("Out of memory\n");
|
ERROR0("Out of memory\n");
|
||||||
|
@ -182,6 +182,10 @@ void* DAUDIO_Open(INT32 mixerIndex, INT32 deviceID, int isSource,
|
|||||||
ERROR1(" DAUDIO_Open: invalid encoding %d\n", (int) encoding);
|
ERROR1(" DAUDIO_Open: invalid encoding %d\n", (int) encoding);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
if (channels <= 0) {
|
||||||
|
ERROR1(" DAUDIO_Open: Invalid number of channels=%d!\n", channels);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
info = (SolPcmInfo*) malloc(sizeof(SolPcmInfo));
|
info = (SolPcmInfo*) malloc(sizeof(SolPcmInfo));
|
||||||
if (!info) {
|
if (!info) {
|
||||||
|
@ -859,6 +859,10 @@ void* DAUDIO_Open(INT32 mixerIndex, INT32 deviceID, int isSource,
|
|||||||
ERROR1("DAUDIO_Open: ERROR: cannot open the device with encoding=%d!\n", encoding);
|
ERROR1("DAUDIO_Open: ERROR: cannot open the device with encoding=%d!\n", encoding);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
if (channels <= 0) {
|
||||||
|
ERROR1("DAUDIO_Open: ERROR: Invalid number of channels=%d!\n", channels);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
if (sampleSizeInBits > 8 &&
|
if (sampleSizeInBits > 8 &&
|
||||||
#ifdef _LITTLE_ENDIAN
|
#ifdef _LITTLE_ENDIAN
|
||||||
isBigEndian
|
isBigEndian
|
||||||
|
Loading…
x
Reference in New Issue
Block a user