![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 4
![]() |
How Can I add a .waw file in c++?
It is enough to write a few line codes to teach me how to do .....?
thanks |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
What is a waw file?
|
|
|
|
|
|
#3 |
|
Programmer
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 4
![]() |
isn't it a music file ?
|
|
|
|
|
|
#4 |
|
Programmer
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 4
![]() |
I'm sorry ... it should be wav
|
|
|
|
|
|
#5 | |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
|
|
#6 |
|
Game engine designer
Join Date: May 2005
Location: Sweden
Posts: 314
Rep Power: 4
![]() |
You should take a look at these two, more or less, platform independent libraries:
OpenAL www.openal.org FMOD www.fmod.org |
|
|
|
|
|
#7 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
If you search the forum you will find some sample code I wrote. It plays "explorer.exe" (or any other file you care to sub in) as a .wav file.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#8 | |
|
Programmer
Join Date: Dec 2005
Posts: 53
Rep Power: 3
![]() |
Quote:
using System;
using System.Windows.Forms;
using Microsoft.DirectX.AudioVideoPlayback;
namespace WhiteNoise
{
public partial class frmMain : Form
{
private Audio m_Audio;
public frmMain()
{
InitializeComponent();
}
private void frmMain_Load(object sender, EventArgs e)
{
m_Audio = new Audio("white noise.wav");
m_Audio.Ending += new EventHandler(m_Audio_Ending);
m_Audio.Play();
}
void m_Audio_Ending(object sender, EventArgs e)
{
m_Audio.Stop();
m_Audio.Open("white noise.wav");
m_Audio.Play();
}
}
} |
|
|
|
|
|
|
#9 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
@Jason Isom: he wanted an example in C++, not C#. I'm afraid it will be only little or no help for him.
|
|
|
|
|
|
#10 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
The sound of one .exe clapping....
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|