Changeset 193 for trunk/classes/mm-progs
- Timestamp:
- Jun 29, 2024, 11:53:08 PM (14 months ago)
- Location:
- trunk/classes/mm-progs/MMPlayer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/classes/mm-progs/MMPlayer/mmplayer.c
r144 r193 51 51 #include "mmprogs_defaults.h" 52 52 #include "sys_funcs.h" 53 54 #if 0 55 #define _PMPRINTF_ 56 #include "PMPRINTF.H" 57 #endif 53 58 54 59 #ifndef OPEN_DEFAULT … … 1101 1106 ULONG mmIdentifyFile(char* chrFile) 1102 1107 { 1103 MMIOINFO mmioInfo ;1104 MMFORMATINFO mmFormatInfo ;1108 MMIOINFO mmioInfo = {0}; 1109 MMFORMATINFO mmFormatInfo = {0}; 1105 1110 FOURCC fourCC; 1106 1107 1108 if(MMIO_SUCCESS!=mmioIdentifyFile(chrFile, &mmioInfo, &mmFormatInfo, &fourCC, 0,0)) 1111 INT rc; 1112 1113 rc=mmioIdentifyFile(chrFile, &mmioInfo, &mmFormatInfo, &fourCC, 0,0); 1114 if(rc!=MMIO_SUCCESS) 1109 1115 { 1116 #ifdef _PMPRINTF_ 1117 DebugHereIAm(); 1118 #endif 1110 1119 return 0; 1111 1120 } 1112 1121 #ifdef _PMPRINTF_ 1122 Pmpf(("MediaType %u", mmFormatInfo.ulMediaType)); 1123 #endif 1113 1124 if(mmFormatInfo.ulMediaType==MMIO_MEDIATYPE_MIDI) 1114 1125 return 1; /* Midi */ … … 1158 1169 ++chrPtrName; 1159 1170 1160 if((rc=mmIdentifyFile(chrSourceName))==0) 1171 rc=mmIdentifyFile(chrSourceName); 1172 if(rc==0) 1161 1173 { 1162 /* FIXME: Identify error !!!*/ 1174 #ifdef _PMPRINTF_ 1175 DebugHereIAm(); 1176 #endif 1177 /* FIXME: Identify error !!!*/ 1163 1178 1164 1179 }; 1165 1180 #ifdef _PMPRINTF_ 1181 Pmpf(("rc %u", rc)); 1182 #endif 1166 1183 if(rc==1) 1167 1168 1184 { 1185 /* It's a MIDI file */ 1169 1186 bIsMidi=TRUE; 1170 1187 } -
trunk/classes/mm-progs/MMPlayer/playaudio.c
r108 r193 48 48 #include "mmplayerres.h" 49 49 #include "mmplayer.h" 50 51 #if 0 52 #define _PMPRINTF_ 53 #include "PMPRINTF.H" 54 #endif 50 55 51 56 /* The object window controling the trac playing */ … … 117 122 { 118 123 char chrCommand[CCHMAXPATH*2]; 119 char chrDevice[30] ;124 char chrDevice[30] = {0}; 120 125 char retMsg[20]; 121 126 ULONG rc; … … 147 152 148 153 if(bIsMidi) 149 strncpy(chrDevice," SEQUENCER", sizeof(chrDevice) - 1);154 strncpy(chrDevice,"sequencer", sizeof(chrDevice) - 1); 150 155 else 151 156 strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice) - 1); 152 157 153 158 hwndNotify=hwndFrame;//WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE); 154 155 159 /* Start audio file */ 156 sprintf(chrCommand,"open \"%s\" type %s alias wave%d SHAREABLEwait", chrSourceName, chrDevice, iWavePriv);160 sprintf(chrCommand,"open \"%s\" type %s alias wave%d shareable wait", chrSourceName, chrDevice, iWavePriv); 157 161 rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwndNotify, 0); 158 if((rc & 0x0000ffff)!=MCIERR_SUCCESS) 159 return 0; 162 if((rc & 0x0000ffff)!=MCIERR_SUCCESS) { 163 return 0; 164 } 160 165 161 166 /* Set time format */
Note:
See TracChangeset
for help on using the changeset viewer.