Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Direct sound

3 views
Skip to first unread message

Kresten Tolstrup

unread,
Apr 23, 2007, 9:58:06 AM4/23/07
to

Hi,
I intend to use direct sound from DirectX. do anyone have any examples?
If I take a new project, include the file dsound.h, and then define the variabel: LPDIRECTSOUND pds;, compile the project, then I get the following errors:
[C++ Error] dsound.h(62): E2257 , expected
[C++ Error] dsound.h(129): E2303 Type name expected
[C++ Error] dsound.h(129): E2139 Declaration missing ;
I'm using BCB6.
Does anyone know what is missing?
Best Regards
Kresten

Remy Lebeau (TeamB)

unread,
Apr 23, 2007, 2:09:58 PM4/23/07
to

"Kresten Tolstrup" <k...@danphone.com> wrote in message
news:462cbb6e$1...@newsgroups.borland.com...

> If I take a new project, include the file dsound.h, and then define
> the variabel: LPDIRECTSOUND pds;, compile the project, then
> I get the following errors:
> [C++ Error] dsound.h(62): E2257 , expected
> [C++ Error] dsound.h(129): E2303 Type name expected
> [C++ Error] dsound.h(129): E2139 Declaration missing ;

The DirectX header files are not very self-contained. They usually
require declarations in other header files, but don't actually include
the headers that they need, requiring the programmer to do it manually
in his/her own code. In this particular case, lines 62 and 129 of
dsound.h are trying to use the WAVEFORMATEX structure, which obviously
has not been declared yet. So you should #include mmreg.h or
mmsystem.h before you #include dsound.h


Gambit


Darren Dwyer

unread,
Jun 2, 2007, 6:35:03 PM6/2/07
to
look at http://bcb-tools.com
DirectX Components for BCB

- darren

"Kresten Tolstrup" <k...@danphone.com> wrote in message
news:462cbb6e$1...@newsgroups.borland.com...
>

0 new messages