403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/audio/faudio/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/audio/faudio/files/patch-src_FAudio__platform__sdl2.c
https://github.com/FNA-XNA/FAudio/issues/183

--- src/FAudio_platform_sdl2.c.orig	2020-04-01 14:55:30 UTC
+++ src/FAudio_platform_sdl2.c
@@ -100,6 +100,18 @@ void FAudio_PlatformInit(
 		want.samples = want.freq / 100;
 	}
 
+	/* SDL audio with arts/dsp backends expect ^2, so round up.
+	 * For 48KHz this should be 512.
+	 * https://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
+        */
+	want.samples--;
+	want.samples |= want.samples >> 1;
+	want.samples |= want.samples >> 2;
+	want.samples |= want.samples >> 4;
+	want.samples |= want.samples >> 8;
+	want.samples |= want.samples >> 16;
+	want.samples++;
+
 	/* Open the device (or at least try to) */
 iosretry:
 	device = SDL_OpenAudioDevice(

Youez - 2016 - github.com/yon3zu
LinuXploit