changeset 35471:f2a11c8695a4

Move declarations to the top of the function.
author reimar
date Sun, 02 Dec 2012 21:44:49 +0000
parents 116dbb38eac0
children 5e4973f679cf
files libao2/ao_dsound.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_dsound.c	Sun Dec 02 21:40:37 2012 +0000
+++ b/libao2/ao_dsound.c	Sun Dec 02 21:44:49 2012 +0000
@@ -416,13 +416,13 @@
 static int init(int rate, int channels, int format, int flags)
 {
     int res;
-	if (!InitDirectSound()) return 0;
 
-	// ok, now create the buffers
 	WAVEFORMATEXTENSIBLE wformat;
 	DSBUFFERDESC dsbpridesc;
 	DSBUFFERDESC dsbdesc;
 
+	if (!InitDirectSound()) return 0;
+
 	//check if the channel count and format is supported in general
 	if (channels > 6) {
 		UninitDirectSound();