Solved

how to play sound (wav) on .net compact framework?

Posted on 2004-04-27
6
4,700 Views
Last Modified: 2012-05-04
Hi, again me...

I want to learn how to play sound (wav, mp3 or wma) on .Net Compact Framework.
(Pocket PC 2003)

Thanks i bag you please answer me...
0
Comment
Question by:Obsolate
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 10928672
Option Explicit
Public Declare Function CreateProcess Lib "coredll" Alias "CreateProcessW" ( _
    ByVal pszImageName As String, _
    ByVal pszCmdLine As String, _
    ByVal psaProcess As Long, _
    ByVal psaThread As Long, _
    ByVal fInheritHandles As Long, _
    ByVal fdwCreate As Long, _
    ByVal pvEnvironment As Long, _
    ByVal pszCurDir As Long, _
    ByVal psiStartInfo As Long, _
    ByVal pProcInfo As Long) As Long
'pword.exe should be peplaced by t he the Mediaplayer exe
'strFileName is the file name
Private Sub Command1_Click()
    Dim lnCreateProcess As Long
    Dim strFileName As String
    strFileName = "\My Documents\DocName.psw"
    On Error Resume Next
    lnCreateProcess = CreateProcess("\Windows\pword.exe", strFileName, 0, 0, 0, 0, 0, 0, 0, 0)
    If lnCreateProcess = 0 Then
        MsgBox Err.Description
    End If
End Sub
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10935303
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 11002233
How did this work out ? Did you spawn a seperate process to do it or did you use the API ?
0
 

Author Comment

by:Obsolate
ID: 11002606
thanx for your help.. but
I'm don't work this codes.. i'm don't use API , i new user to visual basic. very hard (visual hard) :)
how to more basic code? (  play("\test.mp3") )

Comment from Mikal613
Date: 04/27/2004 04:49PM EEST
answers not running
ERROR : NotSupportedException

i'm 0.003 % speak english. ok!!

0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 125 total points
ID: 11003154
The link I gave has at the top a link marked "download" if you look there it has VB.NET source code to play a sound ...

it looks like this ...

WaveOut wo = new WaveOut();
wo.Play(fileName, 512*1024, 0xffff, 0xffff);
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Add Combobox column to datagridview using vb.net 2 42
Send SMS from vb.net desktop app 30 53
Convert VB web project to C# 3 67
Broken .resx file generating errors 18 44
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question