• Windows MCI and Threading in .NET (.NET V1.1, winmm.dll MCI)

    Home » Forums » Developers, developers, developers » DevOps Lounge » Windows MCI and Threading in .NET (.NET V1.1, winmm.dll MCI)

    Author
    Topic
    #424874

    Hi

    I am using the windows MCI, and mciSendString function to play mp3s.

    Playing songs is encapsulated in a class (Song) and this class works fine. I can play, pause and skip through songs, adjust volumes etc. The playing songs are identified by a GUID that is created in the class.

    I wish to fade a song in or out, and I do this by adjusting the volume incrementally, sleeping the thread in between. However, so as not to ‘hang’ the application for the duration of the fade, I created a seperate class to fade a song on a new thread (the class is used to pass the details to the new thread of the song including alias, fade time etc). The problem is that on the new thread, the mciSendString with the alias does not seem to recognise the song loaded and played on the other thread (calling “status volume” returns an empty length string)?

    Does anyone know if there is a way around this, or if in fact this is the problem??

    Regards

    Reply To: Windows MCI and Threading in .NET (.NET V1.1, winmm.dll MCI)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: