Ignore:
Timestamp:
Oct 2, 2023, 11:34:35 PM (23 months ago)
Author:
gyoung
Message:

Remaining changes from merge with Lars 2.9 branch

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/classes/mm-progs/MMPlayer/playaudio.c

    r57 r104  
    2121 * If you need another license for your project/product (commercial,
    2222 * noncommercial, whatever) contact me at
    23  * 
     23 *
    2424 * http://www.os2world.com/cdwriting
    2525 * http://www.geocities.com/SiliconValley/Sector/5785/
     
    7373  char chrCommand[50];
    7474  char retMsg[100];
    75   ULONG rc;
    7675
    7776  iWavePriv=ulPid;
     
    7978  if(bPaused) {
    8079    sprintf(chrCommand,"RESUME wave%d wait", iWavePriv);
    81     rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
     80    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
    8281    bPaused=FALSE;
    8382    showPlayTimeDisplay( hwndFrame, TRUE);
     
    8584  else {
    8685    sprintf(chrCommand,"PAUSE wave%d wait", iWavePriv);
    87     rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
     86    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
    8887    bPaused=TRUE;
    8988  }
     
    9695  char chrCommand[50];
    9796  char retMsg[100];
    98   ULONG rc;
    9997
    10098  iWavePriv=ulPid;
    101  
     99
    102100  if(bIsPlaying) {
    103101    sprintf(chrCommand,"stop wave%d wait", iWavePriv);
    104     rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
    105    
     102    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
     103
    106104    sprintf(chrCommand,"close wave%d wait", iWavePriv);
    107     rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
    108    
     105    mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
     106
    109107    _resetDisplay(hwndFrame);
    110108    showPlayTimeDisplay( hwndFrame, TRUE);
    111109    WinStopTimer(WinQueryAnchorBlock(hwndFrame), hwndFrame, IDTIMER_PLAY);
    112110    bIsPlaying=FALSE;
    113     bPaused=FALSE; 
     111    bPaused=FALSE;
    114112  }
    115113  return TRUE;
     
    155153  hwndNotify=hwndFrame;//WinWindowFromID(hwndTop, IDDLG_TOPMIDDLE);
    156154
    157   /* Start audio file */ 
     155  /* Start audio file */
    158156  sprintf(chrCommand,"open \"%s\"  type %s alias wave%d SHAREABLE wait", chrSourceName, chrDevice, iWavePriv);
    159157  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), hwndNotify, 0);
    160158  if((rc & 0x0000ffff)!=MCIERR_SUCCESS)
    161159    return 0;
    162  
     160
    163161  /* Set time format */
    164162  sprintf(chrCommand,"SET wave%d TIME FORMAT MILLISECONDS wait", iWavePriv);
     
    168166    rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
    169167    return 0;
    170   }     
     168  }
    171169
    172170#if 0
     
    219217  char chrCommand[50];
    220218  char retMsg[20];
    221   APIRET rc;
    222219
    223220  sprintf(chrCommand,"PLAY wave%ld from %ld", ulPid, lPosSec);
    224   rc=mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
     221  mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
    225222  //  ulStartPosition=lPosSec;
    226223  bPaused=FALSE;
     
    269266
    270267/* Every folder has one running play thread to handle play commands */
    271 void _Optlink playThreadFunc (void *arg)
     268void playThreadFunc (void *arg)
    272269{
    273270  HAB  hab;
Note: See TracChangeset for help on using the changeset viewer.