Go Back   Zune Boards > Zune Discussions > Zune Games > Development Discussions > Beginners' Coding

Reply
 
LinkBack Thread Tools
Old 04-23-2009, 07:45 AM   #1 (permalink)
Zuner
 
badmoodguy88's Avatar
 
Join Date: Jun 2008
Posts: 72
badmoodguy88 is on a distinguished road
Default Is it possible to convert SoundEffect to other data type?

Is there any way to Convert a Soundeffect to Some other form of data type?
Such as a string or even a int64 or series of ints?

There is a .ToString method for Soundeffects but from looking at what gets printed when you view it, .ToString just converts some information about the soundeffect to a string. Not the actual sound data in the Soundeffect.

And It did not look like there was any way to convert
Textstring = ( Soundone.ToString());
Back into a Soundeffect

For the same reason it did not look like there was any obvious way to convert anything into a Soundeffect.

The reason this would be useful is that I have read that there is no way to get control the Zune's integrated soundcard, so that to simply make a beep sound you need a wave of a beep that gets loaded as a Soundeffect. But you would not need access to the soundcard if you could generate, modify or piece together from many parts, a wave file, and then load and play the wave file in the form of a soundeffect.

The amount of time that it would take to generate a sound file and then load it as a soundeffect would make it not usable for instantaneous playback of sound (like an electric keyboard). The latency (the amount of time between triggering the sound and it playing) would be wayyyy to high, but they could be generated and loaded in advance just like a normal soundeffect is loaded in advance.

I have a feeling it will turn out that there is no way to write some data and then load it as a soundeffect but I hope I am wrong.



badmoodguy88 is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old 04-23-2009, 05:30 PM   #2 (permalink)
you lost the game.
zB Programmer
Moderator
Elite Zuner
 
itsnotabigtruck's Avatar
 
Join Date: May 2008
Posts: 2,434
itsnotabigtruck has much to be proud ofitsnotabigtruck has much to be proud ofitsnotabigtruck has much to be proud ofitsnotabigtruck has much to be proud ofitsnotabigtruck has much to be proud ofitsnotabigtruck has much to be proud ofitsnotabigtruck has much to be proud of
Default

I'm not necessarily saying there isn't a way, but to the best of my knowledge, negative.
__________________

signature by vettexl




itsnotabigtruck is offline   Reply With Quote
Old 04-23-2009, 06:09 PM   #3 (permalink)
lost in paradise with rae
Support Team
Moderator
Expert Zuner
 
Red Sky's Avatar
 
Join Date: Nov 2007
Location: Pennsylvania
Posts: 2,661
Red Sky is just really niceRed Sky is just really niceRed Sky is just really nice
Send a message via MSN to Red Sky
Default

I know with QBASIC, there was a way to play sounds and you could set the different pitches of them. Sadly, I don't know of a similar method in xna/c#





Red Sky is offline   Reply With Quote
Reply

Bookmarks

Thread Tools