Results 1 to 6 of 6

Thread: Sound

  1. #1

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Sound

    Does anyone know how to play sound files (any kind ie. wav / mp3 etc...) or even just simple tones (multiple tones simultaneously or consecutively)?

    I'm making a ringtone editor for polyphonic mobiles (so I can immortalise things like Bay City Rollers, Bucks Fizz and Bananarama tunes so you can play them endlessly to your friends). And I need a preview facility before uploading to the phone.
    I don't live here any more.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Sadly , there's no multimedia support in both .NET Framework and Compact Framework . The only two ways are : COM Interoper. and API . Can some APIs be run in this phone system ? if yes , then I think I can give you the code .

  3. #3

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Probably, I don't know how to use API functions in .net. (I do in vb6)

    Code would be ace.
    I don't live here any more.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I converted from VB.NET to C# . It's not the perfect solution to play MP3 files (since it won't play files that have spaces in their names) but works if the file named something like this blah.mp3 (but not blah blah.mp3) . If you want the fix , then use this lengthy code : http://www.vbforums.com/showthread.p...hreadid=272432

    PHP Code:
    [DllImport("winmm.dll")]
            private static 
    extern int mciExecute (string lpstrCommand);
        
            
            private 
    void button1_Click(object senderSystem.EventArgs e)
            {
                
    //Play Button
                
    OpenFileDialog OFD=new OpenFileDialog();
                
    OFD.Filter "MP3 Files (*.MP3)|*.MP3";

                if (
    OFD.ShowDialog()==DialogResult.OK)
                {
                    
    mciExecute("OPEN " OFD.FileName " TYPE MPEGVideo ALIAS mp3song ");
                    
    mciExecute("PLAY mp3song");
                }

            }

            private 
    void button2_Click(object senderSystem.EventArgs e)
            {
                
    //Stop Button
                
    mciExecute("CLOSE mp3song");

            } 

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Just googled and found this amazing link . http://www.codeproject.com/useritems...ow_-_playa.asp

  6. #6

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    That's pretty groovy.

    Thanks Pirate.
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width