Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / November 2007

Tip: Looking for answers? Try searching our database.

PlaySound does n't always play the sound file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Murthy - 05 Oct 2007 15:44 GMT
Hi,
I use the below code to play a wave file continously on a windows mobile 5.0
device.
i stop the playing of the wave file on press another button.

But after some time the WCE_PlaySound returns 1 but does not play the sound.
This continues for a few minutes.
During this time i cannot play any sound.

Can someone tell me why this is happening and how i can over come this
problem.

[DllImport("coredll.dll", EntryPoint = "PlaySound", SetLastError = true)]
public extern static int WCE_PlaySound(string szSound, IntPtr hMod, int
flags);
       
public static void PlaySound(string fileName)
       {
              if (fileName != null && fileName != "")
               {
               int iSuc = WCE_PlaySound(RingTone, IntPtr.Zero,
(int)(Flags.SND_ASYNC | Flags.SND_FILENAME | Flags.SND_LOOP));
               if(iSuc == 0)
                   MessageBox.Show("Error");
           }
       }

       public static void StopPlaySound(string File)
       {
           int SND_PURGE = 0x0040;
           WCE_PlaySound(File, IntPtr.Zero, SND_PURGE);
       }

Thanks in Advance,
Murthy
Paul G. Tobey [eMVP] - 05 Oct 2007 16:10 GMT
Device details?

Paul T.

> Hi,
> I use the below code to play a wave file continously on a windows mobile
[quoted text clipped - 33 lines]
> Thanks in Advance,
> Murthy
Murthy - 05 Oct 2007 16:49 GMT
Its a windows mobile 5.0 based device from symbol [MC 9090 Series].

> Device details?
>
[quoted text clipped - 37 lines]
> > Thanks in Advance,
> > Murthy
Paul G. Tobey [eMVP] - 05 Oct 2007 18:39 GMT
You should definitely contact Symbol and tell them about this.  My guess
would be that this is unique to them, unless your testing has concluded
otherwise.  If it has, indicate that here, along with the characteristics of
the sound, how long it takes for this to fail, the other device(s) that
you've tested on and whether this only fails with your sound or with every
sound you've tried.

Paul T.

> Its a windows mobile 5.0 based device from symbol [MC 9090 Series].
>
[quoted text clipped - 41 lines]
>> > Thanks in Advance,
>> > Murthy
rmlaanbroek@hotmail.com - 29 Nov 2007 14:22 GMT
On 5 okt, 18:39, "Paul G. Tobey [eMVP]" <p space tobey no spam AT no
instrument no spam DOT com> wrote:
> You should definitely contact Symbol and tell them about this.  My guess
> would be that this is unique to them, unless your testing has concluded
[quoted text clipped - 4 lines]
>
> Paul T.

I don't think it is a device specific problem, I think it is a Windows
Mobile 2005 specific problem.
I too have problems playing wav files. On a Psion Workabout Pro.
I never had this problem on other mobile OS's, not even on the same
Psion with CE 4.2.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.