codemorphis.com Forum Index codemorphis.com
Software development: pure and simple.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Playing .wav Files

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    codemorphis.com Forum Index -> Visual Programming Forum
View previous topic :: View next topic  
Author Message
mforkner



Joined: 04 Aug 2004
Posts: 78

PostPosted: Sun Jun 05, 2005 11:31 pm    Post subject: Playing .wav Files Reply with quote

I am unable to get the .wav file player component to function.
I have the latest version of DirectX.
Back to top
View user's profile Send private message Visit poster's website
mforkner



Joined: 04 Aug 2004
Posts: 78

PostPosted: Sun Jun 05, 2005 11:54 pm    Post subject: WAV Files Reply with quote

I forgot to mention that I attached a ' Play stat ' component --- and the output dataport was TRUE.

So, the console data states that the .wav file has played -- even though it did not produce a sound.
Back to top
View user's profile Send private message Visit poster's website
mforkner



Joined: 04 Aug 2004
Posts: 78

PostPosted: Mon Jun 06, 2005 8:52 am    Post subject: Also Reply with quote

I also forgot to mention that I had my speakers turned on -- very important for producing sounds.

I was able to play the same .wav file from another application running concurrently.

This was the scenario on my home pc as well as my pc at work.
Back to top
View user's profile Send private message Visit poster's website
CodeMorphis



Joined: 02 Dec 2003
Posts: 252

PostPosted: Mon Jun 06, 2005 11:53 am    Post subject: Reply with quote

Here's a simple example that uses the WAV Player component:



Here is the VPD:

http://www.codemorphis.com/articles/ans05/ans_060605/WAV_player.vpd

Please try this with your WAV file to see if it works.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mforkner



Joined: 04 Aug 2004
Posts: 78

PostPosted: Wed Jun 08, 2005 10:10 pm    Post subject: .WAV file playback Reply with quote

I used the same implementation -- except I hard-coded the path & filename, and had a couple .wav files that would play in a program like Windows Media Player, but would not sound via the Synopsis program -- even though the play stat output was true. I tested several other .wav files, and they play just fine in Sysnopsis. In all, I tested approximately 20 .wav files with no failures.
I never would have guessed that I had a few corrupt .wav files, but I do.

Thank you for the sample code.
Back to top
View user's profile Send private message Visit poster's website
CodeMorphis



Joined: 02 Dec 2003
Posts: 252

PostPosted: Wed Jun 08, 2005 10:30 pm    Post subject: Reply with quote

If they play in Microsoft Media Player then they are not corrupt.

It could be an issue with file format, which might not be readable by the WAV processor being used. Try using the "Get sample info" service of the Wave Player component - that might indicate a sample setting that is not handled.

Try using the Audio Player component, with the exact same services, i.e "Load" and "Play". The Audio Player component is able to play various file formats and might be able to read those troublesome WAV files, especially since the Audio Player component is built using similar technology as the Microsoft Media Player. The Wave Player component uses a different implementation to playback .WAV files and is useful for some odd formats as well as the additional information that it can extract regarding audio sample formats.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    codemorphis.com Forum Index -> Visual Programming Forum All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group