4 Replies - 3951 Views - Last Post: 04 November 2009 - 09:42 PM Rate Topic: -----

#1 MacClassicNerd  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 42
  • Joined: 27-July 09

Sound Header File/Functions

Posted 03 November 2009 - 11:06 PM

Are there any header files for sound in C++? Which ones? Also, which functions in C++ (in which header files) deal with sound?

MacClassicNerd

This post has been edited by MacClassicNerd: 03 November 2009 - 11:07 PM

Is This A Good Question/Topic? 0
  • +

Replies To: Sound Header File/Functions

#2 gronk  Icon User is offline

  • D.I.C Head

Reputation: 13
  • View blog
  • Posts: 168
  • Joined: 28-October 09

Re: Sound Header File/Functions

Posted 04 November 2009 - 12:54 AM

Impossible to answer without knowing which compiler and which operating system you're using. Audio functions are specific to both. In _standard_ C++, no there aren't any, because this is a hardware dependent thing.

If you're using a Mac then there's not much point me looking up the sound help in Visual Studio on WinXP... (which is what I was in the middle of doing when I realised what your userid was :-)

This post has been edited by gronk: 04 November 2009 - 12:55 AM

Was This Post Helpful? 0
  • +
  • -

#3 panpan123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 22-October 09

Re: Sound Header File/Functions

Posted 04 November 2009 - 02:55 AM

#include <mmsystem.h> and lib file in #pragma comment(lib,"winmm.lib") I think it can play .wav file in your system and your program.
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5313
  • View blog
  • Posts: 27,217
  • Joined: 10-May 07

Re: Sound Header File/Functions

Posted 04 November 2009 - 03:02 AM

The basic answer would be no, because sound is not a standard in C/C++. Sound is handled by the OS.
Was This Post Helpful? 0
  • +
  • -

#5 MacClassicNerd  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 42
  • Joined: 27-July 09

Re: Sound Header File/Functions

Posted 04 November 2009 - 09:42 PM

View Postgronk, on 3 Nov, 2009 - 11:54 PM, said:

Impossible to answer without knowing which compiler and which operating system you're using. Audio functions are specific to both. In _standard_ C++, no there aren't any, because this is a hardware dependent thing.

If you're using a Mac then there's not much point me looking up the sound help in Visual Studio on WinXP... (which is what I was in the middle of doing when I realised what your userid was :-)


That is my user ID, but I still use Windows. I use Visual Studio 2008 as well as MPW (Macintosh Programmer's Workshop) on Mac OS 8.6.

This post has been edited by MacClassicNerd: 04 November 2009 - 09:43 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1