Fix PixTone sounds missing their ends
I was accidentally replicating a bug from the original code in the wrong place. I should probably comment on that bug in the accurate branch.
This commit is contained in:
parent
12f69e3c6c
commit
46fdc08ecd
1 changed files with 2 additions and 2 deletions
|
@ -248,7 +248,7 @@ int MakePixToneObject(const PIXTONEPARAMETER *ptp, int ptp_num, int no)
|
|||
++ptp_pointer;
|
||||
}
|
||||
|
||||
lpSECONDARYBUFFER[no] = AudioBackend_CreateSound(22050, ptp->size);
|
||||
lpSECONDARYBUFFER[no] = AudioBackend_CreateSound(22050, sample_count);
|
||||
|
||||
if (lpSECONDARYBUFFER[no] == NULL)
|
||||
return -1;
|
||||
|
@ -306,7 +306,7 @@ int MakePixToneObject(const PIXTONEPARAMETER *ptp, int ptp_num, int no)
|
|||
|
||||
unsigned char *buffer = AudioBackend_LockSound(lpSECONDARYBUFFER[no], NULL);
|
||||
|
||||
memcpy(buffer, mixed_pcm_buffer, ptp->size);
|
||||
memcpy(buffer, mixed_pcm_buffer, sample_count);
|
||||
|
||||
AudioBackend_UnlockSound(lpSECONDARYBUFFER[no]);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue