Changeset 7196 for trunk/src/winmm/waveoutdart.cpp
- Timestamp:
- Oct 25, 2001, 12:47:43 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/winmm/waveoutdart.cpp
r6026 r7196 1 /* $Id: waveoutdart.cpp,v 1. 5 2001-06-16 11:35:22 sandervl Exp $ */1 /* $Id: waveoutdart.cpp,v 1.6 2001-10-24 22:47:42 sandervl Exp $ */ 2 2 3 3 /* … … 35 35 #include "misc.h" 36 36 #include "waveoutdart.h" 37 #include "initwinmm.h" 37 38 38 39 #define DBG_LOCALLOG DBG_waveoutdart … … 80 81 AmpOpenParms.pszDeviceType = ( PSZ ) MCI_DEVTYPE_AUDIO_AMPMIX; 81 82 82 rc = m ciSendCommand(0, MCI_OPEN, MCI_WAIT | MCI_OPEN_TYPE_ID | MCI_OPEN_SHAREABLE,83 rc = mymciSendCommand(0, MCI_OPEN, MCI_WAIT | MCI_OPEN_TYPE_ID | MCI_OPEN_SHAREABLE, 83 84 (PVOID) &AmpOpenParms, 0); 84 85 … … 92 93 //Grab exclusive rights to device instance (NOT entire device) 93 94 GenericParms.hwndCallback = 0; //Not needed, so set to 0 94 rc = m ciSendCommand(DeviceId, MCI_ACQUIREDEVICE, MCI_EXCLUSIVE_INSTANCE,95 rc = mymciSendCommand(DeviceId, MCI_ACQUIREDEVICE, MCI_EXCLUSIVE_INSTANCE, 95 96 (PVOID)&GenericParms, 0); 96 97 if(rc) { … … 118 119 119 120 // Stop the playback. 120 m ciSendCommand(DeviceId, MCI_STOP,MCI_WAIT, (PVOID)&GenericParms,0);121 122 m ciSendCommand(DeviceId, MCI_BUFFER,121 mymciSendCommand(DeviceId, MCI_STOP,MCI_WAIT, (PVOID)&GenericParms,0); 122 123 mymciSendCommand(DeviceId, MCI_BUFFER, 123 124 MCI_WAIT | MCI_DEALLOCATE_MEMORY, 124 125 (PVOID)&BufferParms, 0); … … 128 129 129 130 // Close the device 130 m ciSendCommand(DeviceId, MCI_CLOSE, MCI_WAIT, (PVOID)&GenericParms, 0);131 mymciSendCommand(DeviceId, MCI_CLOSE, MCI_WAIT, (PVOID)&GenericParms, 0); 131 132 } 132 133 … … 173 174 MixSetupParms->pmixEvent = WaveOutHandler; 174 175 175 rc = m ciSendCommand(DeviceId,176 rc = mymciSendCommand(DeviceId, 176 177 MCI_MIXSETUP, 177 178 MCI_WAIT | MCI_MIXSETUP_INIT, … … 181 182 if ( rc != MCIERR_SUCCESS ) { 182 183 mciError(rc); 183 m ciSendCommand(DeviceId, MCI_RELEASEDEVICE, MCI_WAIT,184 mymciSendCommand(DeviceId, MCI_RELEASEDEVICE, MCI_WAIT, 184 185 (PVOID)&GenericParms, 0); 185 186 return(MMSYSERR_NOTSUPPORTED); … … 217 218 } 218 219 219 rc = m ciSendCommand(DeviceId,220 rc = mymciSendCommand(DeviceId, 220 221 MCI_BUFFER, 221 222 MCI_WAIT | MCI_ALLOCATE_MEMORY, … … 225 226 if(ULONG_LOWD(rc) != MCIERR_SUCCESS) { 226 227 mciError(rc); 227 m ciSendCommand(DeviceId, MCI_RELEASEDEVICE, MCI_WAIT,228 mymciSendCommand(DeviceId, MCI_RELEASEDEVICE, MCI_WAIT, 228 229 (PVOID)&GenericParms, 0); 229 230 return(MMSYSERR_NOTSUPPORTED); … … 303 304 304 305 // Resume the playback. 305 m ciSendCommand(DeviceId, MCI_RESUME, MCI_WAIT, (PVOID)&GenericParms, 0);306 mymciSendCommand(DeviceId, MCI_RESUME, MCI_WAIT, (PVOID)&GenericParms, 0); 306 307 307 308 //write buffers to DART; starts playback … … 337 338 338 339 // Pause the playback. 339 m ciSendCommand(DeviceId, MCI_PAUSE, MCI_WAIT, (PVOID)&Params, 0);340 mymciSendCommand(DeviceId, MCI_PAUSE, MCI_WAIT, (PVOID)&Params, 0); 340 341 341 342 return(MMSYSERR_NOERROR); … … 354 355 355 356 // Stop the playback. 356 m ciSendCommand(DeviceId, MCI_STOP, MCI_WAIT, (PVOID)&Params, 0);357 mymciSendCommand(DeviceId, MCI_STOP, MCI_WAIT, (PVOID)&Params, 0); 357 358 358 359 State = STATE_STOPPED; … … 378 379 379 380 // Stop the playback. 380 m ciSendCommand(DeviceId, MCI_STOP, MCI_WAIT, (PVOID)&Params, 0);381 mymciSendCommand(DeviceId, MCI_STOP, MCI_WAIT, (PVOID)&Params, 0); 381 382 382 383 dprintf(("Nr of threads blocked on mutex = %d\n", wmutex.getNrBlocked())); … … 450 451 451 452 mciStatus.ulItem = MCI_STATUS_POSITION; 452 rc = m ciSendCommand(DeviceId, MCI_STATUS, MCI_STATUS_ITEM|MCI_WAIT, (PVOID)&mciStatus, 0);453 rc = mymciSendCommand(DeviceId, MCI_STATUS, MCI_STATUS_ITEM|MCI_WAIT, (PVOID)&mciStatus, 0); 453 454 if((rc & 0xFFFF) == MCIERR_SUCCESS) { 454 455 nrbytes = (mciStatus.ulReturn * (getAvgBytesPerSecond()/1000)); … … 478 479 mciOpenParms.pszDeviceType = (PSZ)MCI_DEVTYPE_WAVEFORM_AUDIO; 479 480 480 rc = m ciSendCommand( (USHORT) 0,481 rc = mymciSendCommand( (USHORT) 0, 481 482 MCI_OPEN, 482 483 MCI_WAIT | MCI_OPEN_TYPE_ID, … … 498 499 mciAudioCaps.ulItem = MCI_GETDEVCAPS_WAVE_FORMAT; 499 500 500 rc = m ciSendCommand(DeviceId, /* Device ID */501 rc = mymciSendCommand(DeviceId, /* Device ID */ 501 502 MCI_GETDEVCAPS, 502 503 MCI_WAIT | MCI_GETDEVCAPS_EXTENDED | MCI_GETDEVCAPS_ITEM, … … 510 511 511 512 // Close the device 512 m ciSendCommand(DeviceId,MCI_CLOSE,MCI_WAIT,(PVOID)&GenericParms,0);513 mymciSendCommand(DeviceId,MCI_CLOSE,MCI_WAIT,(PVOID)&GenericParms,0); 513 514 return(winrc); 514 515 } … … 520 521 char szError[256] = ""; 521 522 522 m ciGetErrorString(ulError, szError, sizeof(szError));523 mymciGetErrorString(ulError, szError, sizeof(szError)); 523 524 dprintf(("WINMM: DartWaveOut: %s\n", szError)); 524 525 #endif … … 714 715 msp.ulLevel = ulVolL; 715 716 716 m ciSendCommand(DeviceId, MCI_SET,717 mymciSendCommand(DeviceId, MCI_SET, 717 718 MCI_WAIT | MCI_SET_AUDIO | MCI_SET_VOLUME, 718 719 &msp, 0); … … 726 727 #endif 727 728 728 m ciSendCommand(DeviceId, MCI_SET,729 mymciSendCommand(DeviceId, MCI_SET, 729 730 MCI_WAIT | MCI_SET_AUDIO | MCI_SET_VOLUME, 730 731 &msp, 0);
Note:
See TracChangeset
for help on using the changeset viewer.