Click here to Skip to main content
       

C#

 
QuestionReturn Values PinmemberC-P-User-321-Feb-13 16:09 
GeneralRe: Return Values PinmemberPIEBALDconsult21-Feb-13 16:34 
AnswerRe: Return Values PinmemberV.21-Feb-13 20:37 
Questionneed full tutorial for making audio player in C# PinmemberChaman Saini21-Feb-13 7:58 
AnswerRe: need full tutorial for making audio player in C# PinmvpEddy Vluggen21-Feb-13 8:37 
AnswerRe: need full tutorial for making audio player in C# PinmvpAbhinav S21-Feb-13 15:36 
AnswerRe: need full tutorial for making audio player in C# PinprofessionalAmir Mohammad Nasrollahi29-Jul-13 21:53 
Questionsimple audio player in C# PinmemberChaman Saini21-Feb-13 5:07 
Hello
      I wanna ask that what is the reason that I am not able to play the mp3 file.     
my whole code for the "class" for simple audio player is as below:-
 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
 
namespace myplayer
{
      class Player
      {
            [DllImport("winmm.dll")]
            private static extern long mciSendString(string lpstrCommand, StringBuilder lpstrReturnString, int uReturnLength, int hwndCallback);
 
            public void open(string file)
            {
                  string command = "open\"" + file + "\" type mpegvideo alias MediaFile";
                  mciSendString(command, null, 0, 0);
            }
 
            public void play()
            {
                  string command = "play MediaFile";
                  mciSendString(command, null, 0,0);
            }
 
            public void stop()
            {
                  string command = "stop MediaFile";
                  mciSendString(command, null, 0, 0);
 
                  command = "close MediaFile";
                  mciSendString(command, null, 0, 0);
                 
            }
 
      }
}
AnswerRe: simple audio player in C# PinprotectorPete O'Hanlon21-Feb-13 5:35 
GeneralRe: simple audio player in C# PinmemberChaman Saini21-Feb-13 5:50 
GeneralRe: simple audio player in C# PinmvpDave Kreskowiak21-Feb-13 6:04 
GeneralRe: simple audio player in C# PinmemberChaman Saini21-Feb-13 6:10 
GeneralRe: simple audio player in C# PinmemberChaman Saini21-Feb-13 6:14 
GeneralRe: simple audio player in C# PinmvpDave Kreskowiak21-Feb-13 12:32 
AnswerRe: simple audio player in C# PinmvpRichard MacCutchan21-Feb-13 6:32 
QuestionC# WPF Memory Leak [modified] Pinmembermicwu20-Feb-13 21:54 
AnswerRe: C# WPF Memory Leak PinmvpAbhinav S20-Feb-13 22:30 
AnswerRe: C# WPF Memory Leak PinmentorKeith Barrow20-Feb-13 23:37 
AnswerRe: C# WPF Memory Leak PinprotectorPete O'Hanlon20-Feb-13 23:46 
GeneralRe: C# WPF Memory Leak PinmemberWu Bin Michael21-Feb-13 15:03 
GeneralRe: C# WPF Memory Leak PinprotectorPete O'Hanlon21-Feb-13 20:28 
AnswerRe: C# WPF Memory Leak PinmvpDave Kreskowiak21-Feb-13 2:28 
GeneralRe: C# WPF Memory Leak PinmemberWu Bin Michael21-Feb-13 14:54 
GeneralRe: C# WPF Memory Leak PinmvpDave Kreskowiak21-Feb-13 15:27 
AnswerRe: C# WPF Memory Leak PinmemberV.21-Feb-13 3:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140718.1 | Last Updated 22 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid