Questions tagged [mci]

MCI (short for Media Control Interface) is a high-level API providing standard commands for playing multimedia devices and recording multimedia resource files.

71 questions
0
votes
0 answers

Media Control Interface fails on Windows 10

I have written some basic C++ programs using the Windows MCI ("Media Control Interface"), notably for playing MIDI and MP3 files. They used to work perfectly on Windows XP. Recently I moved to Windows 10 and now they sometimes work (I have no clue…
0
votes
1 answer

Can I change output midi device of mciSendString

So I finally found one of the posts that helped me out on this class using System; using System.Text; using System.Runtime.InteropServices; using System.IO; namespace MidiProgram { /// /// MCIPlayer is based off code by Slain. /// Found…
hamoodrex
  • 35
  • 7
0
votes
0 answers

Notify when playback is complete in console app

I am working on a console C# app where I want to get notified when an audio playing has finished and I am using winmm.dll for all of this. But the only way I can find to get notified is using Windows.Forms. As explained here and here. Following is…
lbrahim
  • 3,710
  • 12
  • 57
  • 95
0
votes
1 answer

mcisendstring returning null string

I'm stuck trying to retrieve the song length of a music I was able to open and play with WINMM's function mciSendString(); char szCmd[128]; char szResponse[128] = {0}; sprintf_s( szCmd, 128, "status my_alias length"); dwRet = mciSendString(…
Lelo
  • 854
  • 11
  • 25
0
votes
1 answer

MCIWindow with long file path

I have come across a scenario in my project, where I am creating a MCI window in order to play some videos, wherein it does not play correctly when there is a filepath passed to it which is more than 128 characters long. I am creating a new…
Thewads
  • 4,953
  • 11
  • 55
  • 71
0
votes
0 answers

mciSendString, How to get the recorded buffer?

I'm creating a recorder using MCI through the DllImport of winmm.dll: mciSendString. I am able to record and save it. I would like to do some processing on it before saving but I did not find any proper way, method, trick to get the buffer during…
Randall Flagg
  • 4,834
  • 9
  • 33
  • 45
0
votes
1 answer

MCISendCommand Can't find file, but Fstream can so I know it exists, why?

I'm trying to play a midi file using MCISendCommand but I keep getting a DWORD error code 275 (File Not found). I have since placed the relevant code inside a fstream open call which DOES find the file. I then close the file to allow the…
0
votes
1 answer

Detecting mouse clicks on video played with MCI commands

I have an application that plays video. I'm using MCI to play the video and attach it to a panel control. I'm catching mouse clicks on the main form and all the controls, but when I click on the video playing with MCI, it doesn't detect the mouse…
iedoc
  • 2,266
  • 3
  • 30
  • 53
0
votes
1 answer

(python) Different behaviour when called using threading.Timer

I want to make a little command line music player based on the python module "mp3play". I want to check regularly, if a song has stopped playing (and eventually start a new song), but the user should be able to type new commands during that time…
supinf
  • 302
  • 4
  • 13
0
votes
1 answer

Song Information Retrieval

I am trying to retrieve details from an .mp3 file in C# for an audio player. Code snip: [DllImport("winmm.dll")] private static extern long mciSendString(string strCommand, StringBuilder strReturn, int iReturnLength, IntPtr hwndCallback); public…
Gabe
  • 961
  • 1
  • 10
  • 23
0
votes
1 answer

C++ Win32 - How to loop MIDIs with mciSendString()?

I am making a game and I am trying to loop a MIDI file with mciSendString(). I have looked at CProgramming.com but the example's window objects were OWL and I couldn't port them. I also tried looking at Brian Gradin's question but the answer only…
TheNoob
  • 25
  • 6
0
votes
1 answer

if i want to play mp3's what is the difference between lame and MCI(VFW32)?

basic question , i need to play mp3's in my application in windows when goggling i got allot of tutorials about VFW32.lib to play mp3's and i know lame , what is the best option for playing mp3's in c++?
user63898
  • 29,839
  • 85
  • 272
  • 514
0
votes
1 answer

why mciSendString() to get status position fails in my code?

Is there any way to query mci device to query current playing position so that we can resume from there to play later on ? cmd.Format(L"status %d waveaudio position",m_iDeviceIDPlayer); mcirez = mciSendString(cmd,buff.GetBuffer(),1024, NULL); it…
Ashish
  • 8,441
  • 12
  • 55
  • 92
0
votes
2 answers

why MCI_OPEN fails and returns invalid device id?

dwReturn = mciSendCommand(0, MCI_OPEN, MCI_OPEN_ELEMENT | MCI_OPEN_TYPE , (DWORD_PTR)(LPVOID) &mciOpenParms); error -message is "The device name is already being used as an alias by this application. Use a unique alias."…
Ashish
  • 8,441
  • 12
  • 55
  • 92
0
votes
2 answers

playing a list of audio files in sequence

I've been confronted to a situation. I'm writing a Windows app in C# .NET. I want to play multiple .wav files one after another and do that continuously. is there a class that could allow that ? otherwise, how would I implement it ? I tried using…
Attilah
  • 17,632
  • 38
  • 139
  • 202