Cannot get audio resource

G

Guest

Hello,
I am developing PocketPC application in VS2005.
I defined audio resource BeepSound using project properties. When I want to
get resource using MyApp.Properties.Resources.BeepSound in C#, the byte array
is returned, it has the correct length, but contains only binary zeros
instead of the sound.
Sound is played correctly from resource editor in VS, and regardless of
the Persistence property, the I can see the sound correctly included in the
resulting executable.
I can succesfully get BMP images this way in PPC application.
I also tried to do similar thing in full Windows Application, and it works
correctly, but there I am getting audio resource as UnmanagedMemoryStream
instead of byte[] as in Compact Framework project.

The ResXFileCodeGenerator tool generates this access method:
internal static byte[] BeepSound {
get {
object obj = ResourceManager.GetObject("BeepSound",
resourceCulture);
return ((byte[])(obj));
}
}
, but object retrieved contains all zeroes, though length seems correct.
What is wrong? Bug in ResourceManager? Or am I doing something wrong.

Thank you
Yato
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top