Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 1st, 2006, 2:49 PM   #1
boraciner
Programmer
 
boraciner's Avatar
 
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 4 boraciner is on a distinguished road
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
boraciner is offline   Reply With Quote
Old Mar 1st, 2006, 3:00 PM   #2
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
What is a waw file?
Polyphemus_ is offline   Reply With Quote
Old Mar 1st, 2006, 3:12 PM   #3
boraciner
Programmer
 
boraciner's Avatar
 
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 4 boraciner is on a distinguished road
isn't it a music file ?
boraciner is offline   Reply With Quote
Old Mar 1st, 2006, 3:15 PM   #4
boraciner
Programmer
 
boraciner's Avatar
 
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 4 boraciner is on a distinguished road
I'm sorry ... it should be wav
boraciner is offline   Reply With Quote
Old Mar 1st, 2006, 3:16 PM   #5
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
Quote:
Originally Posted by boraciner
I'm sorry ... it should be wav
Ah, I see. I don't know how to play them, but I do know that it depends on your platform. So... what platform are you using?
Polyphemus_ is offline   Reply With Quote
Old Mar 1st, 2006, 3:23 PM   #6
Klarre
Game engine designer
 
Klarre's Avatar
 
Join Date: May 2005
Location: Sweden
Posts: 314
Rep Power: 4 Klarre is on a distinguished road
You should take a look at these two, more or less, platform independent libraries:

OpenAL www.openal.org
FMOD www.fmod.org
Klarre is offline   Reply With Quote
Old Mar 1st, 2006, 4:36 PM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Mar 1st, 2006, 5:22 PM   #8
Jason Isom
Programmer
 
Join Date: Dec 2005
Posts: 53
Rep Power: 3 Jason Isom is on a distinguished road
Quote:
Originally Posted by boraciner
It is enough to write a few line codes to teach me how to do .....?

thanks
The following is something that does nothing but play white noise over and over again. You'll have to add a reference to Microsoft.DirectX.AudioVideoPlayback.dll

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();       
        }        
    }
}
Jason Isom is offline   Reply With Quote
Old Mar 1st, 2006, 5:48 PM   #9
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
@Jason Isom: he wanted an example in C++, not C#. I'm afraid it will be only little or no help for him.
Polyphemus_ is offline   Reply With Quote
Old Mar 1st, 2006, 5:57 PM   #10
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
The sound of one .exe clapping....

Beethoven, no....
__________________
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
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:35 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC