Ignore:
Timestamp:
Jun 29, 2024, 11:53:08 PM (15 months ago)
Author:
gyoung
Message:

Fix the media file identification code so the internal audio player plays MIDI files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/classes/mm-progs/MMPlayer/playaudio.c

    r108 r193  
    4848#include "mmplayerres.h"
    4949#include "mmplayer.h"
     50
     51#if 0
     52#define  _PMPRINTF_
     53#include "PMPRINTF.H"
     54#endif
    5055
    5156/* The object window controling the trac playing */
     
    117122{
    118123  char chrCommand[CCHMAXPATH*2];
    119   char chrDevice[30];
     124  char chrDevice[30] = {0};
    120125  char retMsg[20];
    121126  ULONG rc;
     
    147152
    148153  if(bIsMidi)
    149     strncpy(chrDevice,"SEQUENCER", sizeof(chrDevice) - 1);
     154    strncpy(chrDevice,"sequencer", sizeof(chrDevice) - 1);
    150155  else
    151156    strncpy(chrDevice,"WAVEAUDIO", sizeof(chrDevice) - 1);
    152157
    153158  hwndNotify=hwndFrame;//WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE);
    154 
    155159  /* Start audio file */
    156   sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait", chrSourceName, chrDevice, iWavePriv);
     160  sprintf(chrCommand,"open \"%s\"  type %s alias wave%d shareable wait", chrSourceName, chrDevice, iWavePriv);
    157161  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  }
    160165
    161166  /* Set time format */
Note: See TracChangeset for help on using the changeset viewer.