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
13
votes
3 answers

How to change default sound playback device programmatically?

How to change the default default audio device for playback and recording in vista programmatically ? Is there any registry setting for it like sound manager in window XP? Which API does it?
Ashish
  • 8,441
  • 12
  • 55
  • 92
10
votes
1 answer

Playback 24bit audio not possible

I'm trying to play a 24bit audio file with my AutoHotkey app. It just uses SoundPlay. Windows 7 has no problem, however Windows XP users cannot play the 24bit files. The documentation says: All Windows OSes should be able to play .wav files.…
svandragt
  • 1,672
  • 20
  • 38
7
votes
6 answers

Simplest way to play mp3 from Visual C++

A few years back, I wrote some util library around DShow/DSound to let me play MP3s in a Windows C++ application. Is that still the normal way to do it in a C++/MFC app, or is that an area of DirectX that has been subsumed into the general Windows…
Mr. Boy
  • 60,845
  • 93
  • 320
  • 589
6
votes
3 answers

mciSendString won't play an audio file if path is too long

When the path+filename of a file is really long, I've noticed that PlaySound(fName.c_str(), NULL, SND_ASYNC); works, but not mciSendString((L"open \"" + fName + L"\" type waveaudio alias sample").c_str(), NULL, 0, NULL); mciSendString(L"play…
Basj
  • 41,386
  • 99
  • 383
  • 673
6
votes
1 answer

How to find the source of an 'Access Violation'

To put in a nutshell, I have a C# application doing lots of mciSendString calls ( via dllimport ) to control wav files playback ( essentially open, play, pause, stop, status, close ). And after running for a while, the application crashes without…
DarkUrse
  • 2,084
  • 3
  • 25
  • 33
4
votes
2 answers

MCI_OPEN fails for mp3 files in a C++ console application

This is what I did: DWORD dwReturn; MCI_OPEN_PARMS mciOpenParms; mciOpenParms.lpstrDeviceType = _T("MPEGvideo"); mciOpenParms.lpstrElementName = m_tmpFileName; dwReturn = mciSendCommand(NULL, MCI_OPEN, MCI_OPEN_TYPE |…
Plumenator
  • 1,682
  • 3
  • 20
  • 49
4
votes
5 answers

"A problem occurred in initializing MCI" playsound issues

I'm trying to use playsound to play a file within the folder of my code, however every time I run my code it seems it is able to call the file however I always receive this output: playsound.PlaysoundException: Error 277 for command: open…
Daniel Silver
  • 51
  • 1
  • 1
  • 3
4
votes
3 answers

Attempting to open CD tray

I'm trying to open and close the CD tray of my computer using a piece of code. I have been using MCI commands and have included winmm.lib in the additional dependencies of my project configuration. I've included windows.h and mmsystem.h as well. The…
user3332704
  • 41
  • 2
  • 3
4
votes
1 answer

Does mciSendString must have "wait" in order to hear sound?

I'm trying to write a mp3 player using mci functions.(win 7 64bit,vs2010,c++) when i try to play a mp3 file with the flag "wait" i can hear the file but everything else is stuck until the file ends playing, if i remove the flag "wait" i can continue…
David
  • 287
  • 2
  • 3
  • 13
3
votes
0 answers

WOW64 SetLayeredWindowAttributes LWA_ALPHA

I am displaying a dialog as a layered window using code like this: SetLayeredWindowAttributes(modalDlg, 0, 179, LWA_ALPHA); ...and everything works nicely on 32 bit Windows. However in WOW64 this results in every pixel either appearing black, or…
iforce2d
  • 8,194
  • 3
  • 29
  • 40
3
votes
2 answers

Start and stop MediaElement at specific times

I am change an app over to WPF, it plays audio and video and pictures all based on timed events .. I used "string MciCommand = string.Format("play frames FROM {0} to {1} {2}"" , before. I have been searching and trying to fix this problem now in…
Johnonly
  • 49
  • 1
  • 4
3
votes
0 answers

Implementing pitch audio in cocos2dx for Win32

I'm using cocos2dx's SimpleAudioEngine. ( I need to use that, not the new AudioEngine). I tried to implement pitch function to SimpleAudioEngine for Win32 but I'm stuck. cocos2dx uses MCI for audio playback when SimpleAudioEngine is used. (MCI ref:…
3
votes
2 answers

Has song finished playing? (C# MCI)

I have an mp3 player that sends MCI commands to play pause/ff/rw/stop the audio files etc and the only thing i can't figure out how to do is send an MCI command to tell it to play the next song when the current one's finished playing. The songs are…
anon271334
3
votes
1 answer

Opening And Closing Multiple Drives

I am working on a DVD burning robot. As part of the process I need to open and close the DVD trays, to allow the robot to pick the disks up after burning. I have however run into a problem. I can only control the eject on one dvd recorder! Since…
Robert
  • 43
  • 6
2
votes
0 answers

How to prevent MCI window being shown?

Based on the excellent answer How to play or open *.mp3 or *.wav sound file in c++ program? by user @FarewellStackExchange (I hope he is still with us), I implemented functionality to play mp3 audio using the Windows Media Control Interface (MCI)…
Paul Ogilvie
  • 25,048
  • 4
  • 23
  • 41
1
2 3 4 5