Jump to content


Sound in Directx


  • You cannot reply to this topic
9 replies to this topic

#1 Nahla

    New Member

  • Members
  • Pip
  • 1 posts

Posted 10 December 2005 - 05:45 PM

hi all :

I have a problem with using sound in Directx9
when trying to compile a program(I took this project from a tutorial) it gives me 96 errors!!:) :wallbash:
here r the errors:
------------------------------------------------------------------
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : fatal error C1004: unexpected end of file found
Cone.cpp
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : fatal error C1004: unexpected end of file found
Cuboid.cpp
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : fatal error C1004: unexpected end of file found
Cylinder.cpp
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : fatal error C1004: unexpected end of file found
Font.cpp
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : fatal error C1004: unexpected end of file found
Game.cpp
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : fatal error C1004: unexpected end of file found
Main.cpp
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : fatal error C1004: unexpected end of file found
Mesh.cpp
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : fatal error C1004: unexpected end of file found
Panel.cpp
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : fatal error C1004: unexpected end of file found
Sound.cpp
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : fatal error C1004: unexpected end of file found
Sphere.cpp
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : fatal error C1004: unexpected end of file found
Terrain.cpp
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\strmif.h(1018) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
----------------------------------------------------------------------
cud anyone plz helps me in compiling them

thnx a lot

#2 bladder

    DevMaster Staff

  • Moderators
  • 1057 posts

Posted 11 December 2005 - 05:24 AM

Could be because you are not including windows.h before any other include file.

#3 dicksan

    New Member

  • Members
  • PipPip
  • 12 posts

Posted 12 December 2005 - 04:32 PM

I have something similar atm, but i only get these errors.

c:\dxsdk\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
c:\dxsdk\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\dxsdk\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
c:\dxsdk\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
c:\dxsdk\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
c:\dxsdk\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers


I have tried including windows.h before any others and changing orders of header include files. :S

#4 bladder

    DevMaster Staff

  • Moderators
  • 1057 posts

Posted 13 December 2005 - 03:27 AM

Make sure you are not forgetting to put a ';' after any class or function declaration. Make sur eyou are not defining DWORD anywhere, becayse that's what those statements teh errors refer to use.

#5 monjardin

    Senior Member

  • Members
  • PipPipPipPip
  • 1033 posts

Posted 13 December 2005 - 04:33 AM

From MSDN:

DWORD_PTR
Unsigned long type for pointer precision. Use when casting a pointer to a long type to perform pointer arithmetic. (Also commonly used for general 32-bit parameters that have been extended to 64 bits in 64-bit Windows. )

This type is declared in BaseTsd.h as follows:

typedef ULONG_PTR DWORD_PTR;

#6 dicksan

    New Member

  • Members
  • PipPip
  • 12 posts

Posted 13 December 2005 - 01:45 PM

I have checked the ';'s and havent defined DWORD anywhere, the error messages are referring to dsound.h.

Windows.h and basetsd.h are included before dsound.h and it still has errors.

Please help:ninja:

#7 monjardin

    Senior Member

  • Members
  • PipPipPipPip
  • 1033 posts

Posted 13 December 2005 - 03:22 PM

The newest version of DirectX doesn't get along well with VC6. Here is a workaround:
http://dhost.info/re...wtopic.php?t=56

#8 Onikhaosifix

    Valued Member

  • Members
  • PipPipPip
  • 117 posts

Posted 16 December 2005 - 07:18 PM

For the love of god was posting all of that necessary? And why are you still using VC6?

#9 Nodlehs

    Valued Member

  • Members
  • PipPipPip
  • 152 posts

Posted 16 December 2005 - 07:50 PM

Onikhaosifix said:

For the love of god was posting all of that necessary? And why are you still using VC6?

Why not offer some constructive advice instead of offering only negative comments? It was a valid question, and the OP gave the information he thought necessary for us to help him. Maybe give an alternative to VC6, and how to obtain it legally. Otherwise your post was full of useless text that helps no one.

#10 Onikhaosifix

    Valued Member

  • Members
  • PipPipPip
  • 117 posts

Posted 23 December 2005 - 05:13 AM

Nodlehs said:

Why not offer some constructive advice instead of offering only negative comments? It was a valid question, and the OP gave the information he thought necessary for us to help him. Maybe give an alternative to VC6, and how to obtain it legally. Otherwise your post was full of useless text that helps no one.

http://img312.images...ffdffdfd4dg.jpg

lol, woah take it easy there cowboy. Hopefully my post would encourage the topic creator to just all of that "necessary information" in something called a Pastebin.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users