Last post Sep 09, 2009 03:10 PM by itsRashmi
Mar 24, 2009 07:12 AM|prashant11|LINK
I want play audio file on my mobile form on button control..can u tell me how it can achieve?
plz anyone help me its very urgent or any related url plz send me..
Thanks and regards
Mar 24, 2009 12:01 PM|SurendraKishore|LINK
Enum SoundFlags As Integer
SND_SYNC = &H0 ' play synchronously (default)
SND_ASYNC = &H1 ' play asynchronously
SND_NODEFAULT = &H2 ' silence (!default) if sound not found
SND_MEMORY = &H4 ' pszSound points to a memory file
SND_LOOP = &H8 ' loop the sound until next sndPlaySound
SND_NOSTOP = &H10 ' don't stop any currently playing sound
SND_NOWAIT = &H2000 ' don't wait if the driver is busy
SND_ALIAS = &H10000 ' name is a registry alias
SND_ALIAS_ID = &H110000 ' alias is a predefined ID
SND_FILENAME = &H20000 ' name is file name
SND_RESOURCE = &H40004 ' name is resource name or atom
Declare Function PlaySound Lib "coredll.dll" (ByVal pszSound As String, ByVal hMod As IntPtr, ByVal sf As SoundFlags) As Boolean
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Call PlaySound("\1.wav", IntPtr.Zero, SoundFlags.SND_SYNC)
Since you are targeting a Windows Mobile 6 or above device you may like to investigate a new API which was added in that release called SndPlaySync (http://msdn2.microsoft.com/en-us/library/bb416468.aspx)
You may like to investigate this API because it supports other formats other than *.WAV files, such as MP3s etc.
Mar 24, 2009 12:43 PM|prashant11|LINK
is this support other mobile phone like nokia or sony means otherthan windows mobile.?
Mar 24, 2009 12:52 PM|SurendraKishore|LINK
No, The above code only works for Windows Enabled Devices i.e device which has Windows Mobile OS, or build on Windows CE OS, which has windows Compact Framework. nokia n other mobile makes use of Symbian OS, this code or program made using this code will
not work on other mobile devices.
Sep 09, 2009 03:10 PM|itsRashmi|LINK
I am using aygshell -> SndPlaySync function to play sound on my windows mobile device application. its working good in 6.1 devices but not at all working on 6.5 devices (htc touch dimond2) :(
also where i can find this dll on device to make sure it exists on that device.