- [FIX] Neteja en la APU
This commit is contained in:
@@ -13,8 +13,6 @@ namespace APU
|
|||||||
uint16_t sound_start=0;
|
uint16_t sound_start=0;
|
||||||
float t_sound = 0.0f;
|
float t_sound = 0.0f;
|
||||||
uint32_t samples_generated=0;
|
uint32_t samples_generated=0;
|
||||||
uint32_t samples_time =0;
|
|
||||||
uint32_t samples_t=0;
|
|
||||||
|
|
||||||
#define CH1 channels[0]
|
#define CH1 channels[0]
|
||||||
#define CH2 channels[1]
|
#define CH2 channels[1]
|
||||||
@@ -92,8 +90,6 @@ namespace APU
|
|||||||
SDL_AudioSpec audioSpec{SAMPLING_FREQ, AUDIO_U8, 1, 0, AUDIO_BUFFER_SIZE, 0, 0, NULL, NULL};
|
SDL_AudioSpec audioSpec{SAMPLING_FREQ, AUDIO_U8, 1, 0, AUDIO_BUFFER_SIZE, 0, 0, NULL, NULL};
|
||||||
sdlAudioDevice = SDL_OpenAudioDevice(NULL, 0, &audioSpec, NULL, 0);
|
sdlAudioDevice = SDL_OpenAudioDevice(NULL, 0, &audioSpec, NULL, 0);
|
||||||
resume();
|
resume();
|
||||||
//samples_time=SDL_GetTicks();
|
|
||||||
//audio_viewer::init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void reset()
|
void reset()
|
||||||
@@ -405,7 +401,6 @@ namespace APU
|
|||||||
}
|
}
|
||||||
|
|
||||||
t_sound += dt;
|
t_sound += dt;
|
||||||
samples_t += dt;
|
|
||||||
if (t_sound>=cycles_per_sample) {
|
if (t_sound>=cycles_per_sample) {
|
||||||
t_sound-=cycles_per_sample;
|
t_sound-=cycles_per_sample;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user