Ignore:
Timestamp:
Jul 13, 2017, 5:17:57 AM (8 years ago)
Author:
stevenhl
Message:

Import modifications from cwmm-0_2_9-work-01_10_2006.zip dated 2006-08-27

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mediafolder/c/cdfldr/cdfolderoverriddenwpmethods.cpp

    r2 r4  
    11/*
    2  * This file is (C) Chris Wohlgemuth 2002-2003
     2 * This file is (C) Chris Wohlgemuth 2002-2005
    33 *
    44 * It's part of the Media-Folder distribution
     
    5757extern void showPlayTimeDisplay(CWMediaFolder *thisPtr, BOOL bShow);
    5858void setPlayTimeText2(CWMediaFolder *thisPtr, char * theText);
    59 void HlpWriteToTrapLog(const char* chrFormat, ...);
     59
    6060/* Get the HWND of the play control dialog. This Dialog is on top of
    6161   the top frame control. */
     
    344344    }
    345345  case PLAY_NEXT:
     346  case PLAY_NEXT_CDFLDR:
    346347    if(iWave==0)
    347348      return cwPlayAudioFile(hwndFrame, PLAY_FIRST);/* Not yet playing */
     
    450451  }/* switch */
    451452
    452   if(!getMessage(chrCommand, IDSTR_STARTINGTRACK, sizeof(chrCommand), queryResModuleHandle(),  hwndFrame))
    453     sprintf(chrCommand, "Starting track...");
    454   setPlayTimeText2(this, chrCommand);
     453  //  if(ulWhich!=PLAY_NEXT_CDFLDR) {
     454    if(!getMessage(chrCommand, IDSTR_STARTINGTRACK, sizeof(chrCommand), queryResModuleHandle(),  hwndFrame))
     455      sprintf(chrCommand, "Starting track...");
     456    setPlayTimeText2(this, chrCommand);
     457    // }
    455458
    456459  strncpy(chrDevice,"CDAUDIO", sizeof(chrDevice));
     
    519522  }/*   if( ...|| !mrcPlaying) */
    520523
    521   if(iPrevTrack+1==iTime2) {
     524  if(iPrevTrack+1==iTime2 && ulWhich!=PLAY_NEXT_CDFLDR) {
    522525    /* Previous track ended, now playing the next. Or user pressed 'Next' while playing */
    523526    if(ulPos*1000 < ulTotalLength) {
     
    539542        return 0;
    540543      }
    541       //  HlpWriteToTrapLog("\n2\n");
    542     }
    543   }
    544 
    545   //  HlpWriteToTrapLog("About to get length...\n");
     544    }
     545  }
    546546
    547547  /* Get length in ms */
     
    552552  }
    553553
    554   // HlpWriteToTrapLog("iTime2: %d\n", iTime2);
    555 
    556554  sprintf(chrCommand,"%d:%02d  %d:%02d  -%d:%02d", iTime2/60, iTime2%60,
    557555          0, 0,
    558556          iTime2/60, iTime2%60);
    559557
    560   //  HlpWriteToTrapLog("chrCommand: %s\n", chrCommand);
    561558 
    562559  //  WinSetWindowText(WinWindowFromID(hwndTop, IDST_PLAYTIME), chrCommand);
     
    658655  int iCurrentTrack;
    659656
     657  //SysWriteToTrapLog("\n%s:\n", __FUNCTION__);
     658
    660659  sprintf(chrCommand,"STATUS wave%d MODE WAIT", iWave);
    661660  rc = mciSendString(chrCommand, retMsg, sizeof(retMsg), 0, 0);
     
    688687  else {
    689688    iCurrentTrack=atoi(retMsg);
     689    //SysWriteToTrapLog(" iWave: %d. iPrevTrack: %d, iCurrentrack: %d\n", iWave, iPrevTrack, iCurrentTrack);
    690690    /* Timeout. Check if track is still playing */
    691691    if(iCurrentTrack==iPrevTrack+1) {
    692692      /* Audio file played. Start next */
    693       cwPlayAudioFile(hwndFrame, PLAY_NEXT);
    694     }
    695   }
    696 }
    697 
    698 
    699 
    700 
    701 
    702 
    703 
    704 
    705 
     693      //SysWriteToTrapLog(" iWave: %d. iPrevTrack: %d, iCurrentrack: %d, startinb next (%d)\n", iWave, iPrevTrack, iCurrentTrack, __LINE__);
     694      cwPlayAudioFile(hwndFrame, PLAY_NEXT_CDFLDR);
     695    }
     696  }
     697}
     698
     699
     700
Note: See TracChangeset for help on using the changeset viewer.