Skip to content

Commit

Permalink
Revert "CROSS2D: remove un-needed audio buffer hack (SDL2/PSP2)"
Browse files Browse the repository at this point in the history
This reverts commit 4f6aa35.
  • Loading branch information
rsn8887 committed Feb 4, 2017
1 parent 4f6aa35 commit f4b2265
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pfba/deps/libcross2d/src/sdl2/sdl2_audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ SDL2Audio::SDL2Audio(int freq, int fps) : Audio(freq, fps) {

// Find the value which is slighly bigger than buffer_len*2
for (sample_size = 512; sample_size < (buffer_len * 2); sample_size <<= 1);
sample_size /= 4; // fix audio delay
buf_size = sample_size * channels * 2 * 8;
buffer_sdl = (unsigned char *) malloc((size_t) buf_size);
memset(buffer_sdl, 0, (size_t) buf_size);
Expand Down

0 comments on commit f4b2265

Please sign in to comment.