Your experience with VorbisPlayer

Coordinator
Jul 31, 2010 at 10:17 PM

What is your experience with VorbisPlayer? Do you have problems, or suggestions to improve? Please let me know.

Nov 18, 2010 at 1:51 AM

First of all, it's great having a way to seamlessly play audio loops in Silverlight, a problem that's plagued me for a long time. Thanks for VorbisPlayer!

But I seem to have a problem with VorbisPlayer. I've successfully created the VorbisPlayer.dll, and referenced it in my own app. But during runtime, at code line audioStreams.Add(myAudioFiles[filename]);
I get this error message: a KeyNotFoundException, given key was not present in the dictionary.

Am I missing something simple here? The code I've used is pretty well the same as given in the PlaySeamless example (except I'm using real audio files).

Thanks.

David

 

Coordinator
Nov 18, 2010 at 6:23 AM
Hi David,

Make sure that all audio files are in memory before you start playing anything.

If this remark does not help, please tell me in which code file you experience the exception. I'll will have a look at it later.

Regards.
Frank



Op 18-11-2010 3:51, VBGuy schreef:

From: VBGuy

First of all, it's great having a way to seamlessly play audio loops in Silverlight, a problem that's plagued me for a long time. Thanks for VorbisPlayer!

But I seem to have a problem with VorbisPlayer. I've successfully created the VorbisPlayer.dll, and referenced it in my own app. But during runtime, at code line audioStreams.Add(myAudioFiles[filename]);
I get this error message: a KeyNotFoundException, given key was not present in the dictionary.

Am I missing something simple here? The code I've used is pretty well the same as given in the PlaySeamless example (except I'm using real audio files).

Thanks.

David

Read the full discussion online.

To add a post to this discussion, reply to this email (vorbisplayer@discussions.codeplex.com@discussions.codeplex.com)

To start a new discussion for this project, email vorbisplayer@discussions.codeplex.com@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Nov 19, 2010 at 1:46 AM

Thanks for the help. I don't think I'm initializing the Dictionary properly. Here's the code:

       public readonly Dictionary<string, Stream> myAudioFiles = new Dictionary<string, Stream>();   
       
        public MainPage()
        {
            InitializeComponent();
            myAudioFiles.Add("Music1.ogg", ); //what value do I use for Stream?
       
        }

I don't know what value to use for Stream.

Thanks.

David

Coordinator
Nov 19, 2010 at 6:50 AM
Hi David,

The stream is the audio file. It depends where you want to store the file. You can embed it as a resource in your Silverlight app. You can also get it from the server when the app is running. I use the latter method, I load all music in the "Splashscreen" of my game, where you see a progressbar loading.

You can get files from the server with the WebClient class, which gives you a Stream when finished. If you want to use embededded resources, you'll have to look into that yourself I'm afraid, but I'm sure you'll get a Stream with that method as well. It is probably done with the Assembly class.

Regards,
Frank




Op 19-11-2010 3:46, VBGuy schreef:

From: VBGuy

Thanks for the help. I don't think I'm initializing the Dictionary properly. Here's the code:

public readonly Dictionary<string, Stream> myAudioFiles = new Dictionary<string, Stream>();

public MainPage()
{
InitializeComponent();
myAudioFiles.Add("Music1.ogg", ); //what value do I use for Stream?

}

I don't know what value to use for Stream.

Thanks.

David

Read the full discussion online.

To add a post to this discussion, reply to this email (vorbisplayer@discussions.codeplex.com@discussions.codeplex.com)

To start a new discussion for this project, email vorbisplayer@discussions.codeplex.com@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Dec 7, 2010 at 3:56 AM

Hi Frank

thanks for this code.

I'm trying to use it within a simple game demo, and i'm experiencing memory leaks, either playing single sounds or playing a loop.

Of course I tested all the code even using Windbg+sos, when I remove the sound effects, there is no memory leaks, when I play the sounds, memory is eaten. In a few minutes more than 1,5 GB can be eaten, crashing the app with an out of memory exception. Before this point the sound become distorded.

have you any clue or idea about this problem ?

thanks in advance

regards

Olivier

Coordinator
Dec 7, 2010 at 7:39 PM
Hi Oliver,

I never had this experience. Does this also happen when you only play sound effects without music?
Also, at what bitrate does your sound effects play? Did you use the code examples in the package to play a sound?

Regards,
Frank


Op 7-12-2010 5:56, odahan schreef:

From: odahan

Hi Frank

thanks for this code.

I'm trying to use it within a simple game demo, and i'm experiencing memory leaks, either playing single sounds or playing a loop.

Of course I tested all the code even using Windbg+sos, when I remove the sound effects, there is no memory leaks, when I play the sounds, memory is eaten. In a few minutes more than 1,5 GB can be eaten, crashing the app with an out of memory exception. Before this point the sound become distorded.

have you any clue or idea about this problem ?

thanks in advance

regards

Olivier

Read the full discussion online.

To add a post to this discussion, reply to this email (vorbisplayer@discussions.codeplex.com@discussions.codeplex.com)

To start a new discussion for this project, email vorbisplayer@discussions.codeplex.com@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Dec 30, 2010 at 6:11 AM

Hi SeuJogo ,

Thanks for answering.

I experienced the memory leaks while playing a simple sound loop.

It is a bit strange.

To be honest, after a while I decided to forgive.. I came back to a pool of mediaElement for sound effect and I used DDtMM mp4 code to create the background music loop.

Perhaps something in the way I used the code ? but I spent some times to verify and debug, even with Windbg and sos extensions.

I’ll give it a try in a new application to see if things are different…

Thanks again for your mail

Happy Holidays

Olivier

De : SeuJogo [email removed]
Envoyé : mardi 7 décembre 2010 21:39
À : odaha
n@gmail.com
Objet : Re: Your experience with VorbisPlayer [vorbisplayer:222084]

From: SeuJogo

Hi Oliver,

I never had this experience. Does this also happen when you only play sound effects without music?
Also, at what bitrate does your sound effects play? Did you use the code examples in the package to play a sound?

Regards,
Frank


Op 7-12-2010 5:56, odahan schreef:

From: odahan

Hi Frank

thanks for this code.

I'm trying to use it within a simple game demo, and i'm experiencing memory leaks, either playing single sounds or playing a loop.

Of course I tested all the code even using Windbg+sos, when I remove the sound effects, there is no memory leaks, when I play the sounds, memory is eaten. In a few minutes more than 1,5 GB can be eaten, crashing the app with an out of memory exception. Before this point the sound become distorded.

have you any clue or idea about this problem ?

thanks in advance

regards

Olivier

Read the full discussion online.

To add a post to this discussion, reply to this email (vorbisplayer@discussions.codeplex.com@discussions.codeplex.com)

To start a new discussion for this project, email vorbisplayer@discussions.codeplex.com@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com