Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Robert Walter  
#1 Posted : Thursday, February 9, 2012 11:08:08 AM(UTC)
Robert Walter

Joined: 8/24/2011(UTC)
Posts: 68

Thanks: 4 times
Hi everyone,

I'm currently looking for a possibility to develop a WP7 App/game where one can (playfully) influence existing or even create new audio files to save on the phone. Since WP7 only allows managed code, I haven't found any such library that provides the necessary low level actions for audio files, yet. Even the XNA-method GetVisualizationData(..) of the MediaPlayer class doesn't work on WP7 (fills the array with 0's). Do you know if MS does not want us developers to create apps that feature such low level actions?

Would the Delta Engine be the right choice for our intention? Looking at the Multimedia Namespace, there seem to be no such features available yet. But are they on your roadmap?

Best,
Robert

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline Benjamin  
#2 Posted : Thursday, February 9, 2012 11:16:03 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
It should certainly be possible. It has been a long time, but I created some own music playback classes many years ago in XNA and I think they should still work with WP7. You basically just create a sound effect instance out of a buffer and play it while updating another buffer (or update further ahead).

In your case you just upload some sound data into such a dynamic buffer and play it after creating it. I think it works very similar to creating dynamic textures (which is also implemented in the Delta Engine and supported on WP7).

I think what you are looking for in XNA is called DynamicSoundEffect or DynamicSoundEffectInstance. If you have an XNA sample (e.g. in Windows) running of what you want to accomplish we can easily add it to the engine and support it (on OpenTK this is already implemented and is how Ogg playback works, so you can also test it there).

Hope that helps!

Update: Here is an article talking about this in more detail: http://www.codeproject.c...nstance-to-Create-Sounds

Edited by user Thursday, February 9, 2012 11:17:09 AM(UTC)  | Reason: Not specified

thanks 1 user thanked Benjamin for this useful post.
Robert Walter on 2/9/2012(UTC)
Offline Robert Walter  
#3 Posted : Thursday, February 9, 2012 1:34:07 PM(UTC)
Robert Walter

Joined: 8/24/2011(UTC)
Posts: 68

Thanks: 4 times
Thanks for the quick answer, I will have a look at it and report back if this addresses what we are looking for.

Best,
Robert
Offline Robert Walter  
#4 Posted : Thursday, February 9, 2012 8:15:34 PM(UTC)
Robert Walter

Joined: 8/24/2011(UTC)
Posts: 68

Thanks: 4 times
Alright, digged a little bit into this.
In principle, you are right and it is very interesting what the Microsoft.Xna.Framework.Audio namespace offers. Unfortunately, I want to be able to load existing wma and/or mp3 files from a windows phone and include them into a game/app so that the user can influence them and write them back on the device. There seems to be no support to handle compressed formats in a purely managed environment, yet (compare e.g. http://forums.create.msd...rums/p/61076/375730.aspx). The only promising thing I found so far is the project for handling ogg-files in a pure C# library (no PInvoke): http://oggsharp.codeplex.com/

but WP7 does not support ogg -.-

Anyway, thanks for the help!
Offline Benjamin  
#5 Posted : Friday, February 10, 2012 12:55:11 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Well, you could load them via the Content System, which supports uploading mp3 or ogg or wma files and gives you back .wav files. But there is currently not much support to do this at runtime (it works in theory, we do it in unit tests and it is how the ContentManager tool works).

An alternative would be to decompress the data yourself (in C#) and handle the sound playback and manipulation locally. In either case, not an easy task.
Offline Robert Walter  
#6 Posted : Friday, February 10, 2012 4:58:16 PM(UTC)
Robert Walter

Joined: 8/24/2011(UTC)
Posts: 68

Thanks: 4 times
Yep, these are the options I also see. When I find some spare time and motivation, I will see if I can tackle the first one. I'm definitely not enough into audio coding to write a standalone managed mp3 encoder/decoder... but I'd be the first who'd use one ;)
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.066 seconds.