winejack.drv: Assign to structs instead of using memcpy.
authorAndrew Talbot <andrew.talbot@talbotville.com>
Wed, 26 Mar 2008 21:56:33 +0000 (21:56 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 26 Mar 2008 22:48:25 +0000 (23:48 +0100)
dlls/winejack.drv/audio.c

index 00daf80cb132dd42ad9707435466fdce71f9a6c7..0e742f475040c7465aabb4d9ad2b71fb35e95466 100644 (file)
@@ -1307,9 +1307,8 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
 
     dwFlags &= ~WAVE_DIRECTSOUND;  /* direct sound not supported, ignore the flag */
 
-    wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
-    
-    memcpy(&wwo->waveDesc, lpDesc,          sizeof(WAVEOPENDESC));
+
+    wwo->waveDesc = *lpDesc;
     memcpy(&wwo->format,   lpDesc->lpFormat, sizeof(PCMWAVEFORMAT));
 
     /* open up jack ports for this device */
@@ -2111,8 +2110,8 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
     dwFlags &= ~WAVE_DIRECTSOUND;  /* direct sound not supported, ignore the flag */
 
     wwi->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK);
-    
-    memcpy(&wwi->waveDesc, lpDesc,          sizeof(WAVEOPENDESC));
+
+    wwi->waveDesc = *lpDesc;
     memcpy(&wwi->format,   lpDesc->lpFormat, sizeof(PCMWAVEFORMAT));
 
     LeaveCriticalSection(&wwi->access_crst);