Fix a warning, and check size of sample update.
This commit is contained in:
parent
54d677f8fa
commit
91c4885298
|
@ -440,11 +440,6 @@ static void sgx_write_port(UINT8 port, UINT8 data)
|
|||
}
|
||||
}
|
||||
|
||||
static INT32 pce_cpu_sound_sync()
|
||||
{
|
||||
return (INT32)((INT64)7159090 * nBurnCPUSpeedAdjust / (0x0100 * 60));
|
||||
}
|
||||
|
||||
static INT32 MemIndex(UINT32 cart_size, INT32 type)
|
||||
{
|
||||
UINT8 *Next; Next = AllMem;
|
||||
|
|
|
@ -153,12 +153,12 @@ void c6280_init(double clk, INT32 bAdd)
|
|||
|
||||
p->bAdd = bAdd;
|
||||
|
||||
bprintf (0, _T("%d\n"), nBurnSoundLen);
|
||||
|
||||
stream_buffer = (INT16*)BurnMalloc(nBurnSoundLen * 2 * sizeof(INT16));
|
||||
|
||||
if (stream_buffer == NULL) {
|
||||
#if defined FBA_DEBUG
|
||||
bprintf (0, _T("Stream buffer allocation failed!\n"));
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -179,6 +179,8 @@ static void c6280_stream_update()
|
|||
INT32 start = c6280_previous_offset;
|
||||
|
||||
INT32 samples = end - start;
|
||||
if (!samples) return; // don't update if length is 0
|
||||
|
||||
INT16 *pBuffer = stream_buffer + start * 2;
|
||||
|
||||
c6280_previous_offset = end;
|
||||
|
|
Loading…
Reference in New Issue