mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-30 10:30:22 +00:00
Submit a number of quiet samples on first initialization
This seems to make it a little less choppy on mobile first launch
This commit is contained in:
parent
d25acb1da0
commit
5692c1dc95
@ -359,11 +359,12 @@ void speaker_init(void) {
|
|||||||
|
|
||||||
remainder_buffer_size_max = ((CLK_6502_INT*(unsigned long)CPU_SCALE_FASTEST)/audio_backend->systemSettings.sampleRateHz)+1;
|
remainder_buffer_size_max = ((CLK_6502_INT*(unsigned long)CPU_SCALE_FASTEST)/audio_backend->systemSettings.sampleRateHz)+1;
|
||||||
|
|
||||||
samples_buffer = malloc(channelsSampleRateHz * sizeof(int16_t));
|
samples_buffer = calloc(1, channelsSampleRateHz * sizeof(int16_t));
|
||||||
if (!samples_buffer) {
|
if (!samples_buffer) {
|
||||||
err = -1;
|
err = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
samples_buffer_idx = bufferSizeIdealMax;
|
||||||
|
|
||||||
remainder_buffer = malloc(remainder_buffer_size_max * sizeof(int16_t));
|
remainder_buffer = malloc(remainder_buffer_size_max * sizeof(int16_t));
|
||||||
if (!remainder_buffer) {
|
if (!remainder_buffer) {
|
||||||
|
Loading…
Reference in New Issue
Block a user