INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: looping at the end of a song  (Read 2570 times)

Tolga

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 438
looping at the end of a song
« on: March 15, 2010, 02:41:13 pm »

Occasionally MC becomes unresponsive at the end of a song or repeats the last second of the song a couple of times. This is a nightmare for me because I am DJing with MC. I suspect some background activity is causing this but I am not sure what. It feels that some background activity takes priority over going to the next song.

I use one year old dell laptop with two cores, Win7x64. I run MC on high priority and turn of programs that run in the background. I use Directsound with only volume leveling and equalizer with 6sec prebuffering. (play from memory didn't work very well either, maybe because i have change the sequence often).

Does anyone have experience and solutions with problems that occur specifically at the end of a song.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72541
  • Where did I put my teeth?
Re: crashes at the end of a song
« Reply #1 on: March 15, 2010, 03:03:56 pm »

The repeat is probably happening in the sound hardware, after MC.

Some of the playback options under MC's Audio Options may help.

Another sound device might work better.  

Simplifying the setup of the machine would be worth considering.  Eliminate anything unnecessary.  Virus checker, for example.  If memory is fully used,  you may also have swapping to disk.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42442
  • Shoes gone again!
Re: looping at the end of a song
« Reply #2 on: March 15, 2010, 03:11:58 pm »

I run MC on high priority

We don't recommend that, as it will allow the UI to take cycles from the playback threads.  This alone could explain the problem.



Quote
I use Directsound with only volume leveling and equalizer with 6sec prebuffering. (play from memory didn't work very well either, maybe because i have change the sequence often).

Increase the buffering slider in 'Output mode settings...' from 0.5 seconds to 1.0 seconds.  Or try WASAPI since you use Win7.
Logged
Matt Ashland, JRiver Media Center

Tolga

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 438
Re: looping at the end of a song
« Reply #3 on: March 15, 2010, 03:51:44 pm »

Thank you both. I will try your recommendations. I am also considering another potential problem. Just before DJing, I often move the database to my laptop from my main computer. This is fine for me since I never change file locations and they are the same on both machines. Therefore, the file tags may be out of sync with the library.(I still don't use regular sync because I am not sure how reliable it is, and it changes relative paths)  I suspect that the automatic tag update may be creating some of the problems. I am afraid I don't have hard evidence.

Do you think tag update may be interfering with playback? I feel like problems increase when I am tagging music that is being played and I make rapid changes on what is being played.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: looping at the end of a song
« Reply #4 on: March 15, 2010, 04:31:22 pm »

Normally a tag update should be a light task that does not cause playback problems.

One exception is if the file does not enough empty space (aka padding) that is reserved for tag changes and the particular tag format stores tags in the beginning of the files (ID3v2 tags in MP3 files and the Vorbis comments in FLAC and Ogg Vorbis files are stored in the beginning of the file). When there is not enough padding space the complete file must be rewritten and that may sometimes cause problems.

You can try if disabling the "Options > General > Update tags when file info changes" setting makes any difference. If that helps you can always re-enable the setting after the DJ gig and do "update tags from library". You can use a "recently played" smartlist for selecting the files if you have tagged only the played files.

You can also untick all auto-import features so that MC does not monitor file changes during the gig.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Tolga

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 438
Re: looping at the end of a song
« Reply #5 on: March 15, 2010, 06:44:39 pm »

Ok, I am closing in to the source of the problem. I can reproduce it 50% of the time now. I moved into WASAPI and use output format conversion now (otherwise my sound card does not play unusual formats). The problem occurs frequently with files in unusual format (i.e. 8bit). It happens at the end of the song. It loops while getting ready for the next song. I see a  buffering % messages on the top pane while this is happening.

It may be also possibly be happening while switching between songs in different formats.

Logged

Tolga

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 438
Re: looping at the end of a song
« Reply #6 on: March 15, 2010, 07:11:01 pm »

I am posting a log since this problem happens very reliably now. I start the log while playing the first song (1 channel 1kHz 8bit WAV) and the loop happens while moving to the second song. 22k 8bit WAV. I use WASAPI, output conversion to 44kHz 16bit 2 Channel (otherwise my sound card does not work). 6 sec Prebuffering, 1.5 sec WASAPI buffering. Interesting note, increasing WASAPI buffering causes MC to complain that the sound card cannot handle the format.

My original problem did not happen for weird files like these but they may be related.

The log shows podcasting event but I had logs with the same problem without podcasting events too.
---------------------------
 

Media Center; Version: 14.0.155; Types: 16383
0017379: 5108: General: Starting logging: Date: 3/15/2010 5:01 PM
0017395: 5108: General: Log Reset: Logging reset
0003432: 5108: General: CMCResourceHelper::GetIsModalPopupShowing: Main window disabled
0141087: 3116: Playback: CMJWaveFeeder::Thread: Finished feeder loop (bCancel: 0)
0012792: 3116: Playback: CPlayerZone::PlayNextFile: bCanPlayNext=1, m_bPlaybackError=0
0012808: 5108: Playback: CPlayerZone::Next: Start
ish (45787 ms)
0012823: 5108: Playback: CPlayerZone::Next: Checking for invalid position
0012823: 5108: Playback: CPlayerZone::Next: Attempting next chapter
0012839: 5108: Playback: CPlayerZone::Next: Checking for next disabled
0012854: 5108: Playback: CPlayerZone::Next: Checking for display / internal mismatch
0012870: 5108: Playback: CPlayerZone::Next: Checking can play next state
0012886: 5108: Playback: CPlayerZone::Next: Updating position, old=1
0012901: 5108: Playback: CPlayerZone::Next:   new=2
0012901: 5108: Playback: CPlayerZone::Next: Play
0012917: 5108: Playback: CPlayerZone::Play: Start
0012932: 5108: Playback: CPlayerZone::Play: Handling exclusive playback zones
0012948: 5108: Playback: CPlayerZone::Play: Getting actual playback track
0012964: 5108: Playback: CPlayerZone::Play: Processing play for 'c:\Media\Shared\Music\RELEASE\UNGROUPED\ASLI MIXED SONGS\crowe-wav-prime\Amazing grace.wav'
0012979: 5108: Playback: CPlayerZone::Play: Updating internal track info
0012995: 5108: Playback: CPlayerZone::Play: Playing: <XMLFN version="1.0"><Item Name="Filename">c:\Media\Shared\Music\RELEASE\UNGROUPED\ASLI MIXED SONGS\crowe-wav-prime\Amazing grace.wav</Item><Item Name="ReplayGainTrackAutoPreamp">3906</Item><Item Name="FileType">wav</Item><Item Name="ReplayGainTrack">-22271</Item><Item Name="ReplayGainAlbumAutoPreamp">3906</Item><Item Name="ReplayGainAlbum">-22271</Item><Item Name="MediaType">Audio</Item><Item Name="DatabaseKey">3274393</Item><Item Name="Bookmark"></Item><Item Name="AlbumSequentialWithLastTrack">0</Item><Item Name="PlaylistIndex">2</Item></XMLFN> / wav
0013010: 5108: Playback: CJRPlaybackEngine::Play: Start
0013026: 5108: Playback: CJRPlaybackEngine::Play: Playing: c:\Media\Shared\Music\RELEASE\UNGROUPED\ASLI MIXED SONGS\crowe-wav-prime\Amazing grace.wav
0013026: 5108: Playback: CJRPlaybackEngine::Play: Filetype: wav; Type: 1; Can play: 1; Playback object: 0x6b211b0
0013042: 5108: Playback: CJRPlaybackEngine::StartPlayFile: Start
0013057: 5108: Playback: CMJPlaybackType::Play: Start
0013073: 5108: Playback: CMJPlayerCore::Play: Start
0013120: 5108: Playback: CMJWaveFeeder::~CMJWaveFeeder: Start
0013120: 5108: Playback: CMJWaveFeeder::~CMJWaveFeeder: Cancel
0013135: 5108: Playback: CMJWaveFeeder::~CMJWaveFeeder: Stopping thread
0013151: 5108: Playback: CMJWaveFeeder::~CMJWaveFeeder: Deleting input source
0013166: 5108: Playback: CMJWaveFeeder::~CMJWaveFeeder: Unloading DLL
0013182: 5108: Playback: CMJWaveFeeder::~CMJWaveFeeder: Finish (62 ms)
0013198: 5108: Playback: CMJPlayerCore::Play: Created feeder helper for type wav (native: 1)
0013213: 5108: Playback: CMJWaveFeeder::Play: Start
0013229: 3196: Playback: CMJWaveFeeder::Thread: Start
0013229: 5108: Playback: CMJWaveFeeder::Play: Finish (16 ms)
0013244: 3196: Playback: CMJWaveFeeder::Thread: Adding skinning
0013244: 5108: Playback: CMJPlayerCore::Play: Play succeeded
0013260: 5108: Playback: CMJPlayerCore::Play: Result: 1
0013260: 3196: Playback: CMJWaveFeeder::Thread: Opening file
0013276: 5108: Playback: CMJPlayerCore::Play: Finish (203 ms)
0013276: 3196: Playback: CMJWaveFeeder::Thread: Setting output format
0013291: 5108: Playback: CMJPlaybackType::Play: Play result: 1
0013291: 3196: Playback: CPlayerZone::OnNewStream: Start
0013307: 3196: Playback: CPlayerZone::OnNewStream: Finish (16 ms)
0013307: 5108: Playback: CMJPlaybackType::Play: Finish (250 ms)
0013322: 3196: Playback: CMJPlayerCore::GetOutputFormat: Start
0013322: 5108: Playback: CJRPlaybackEngine::StartPlayFile: Play returned: 1
0013338: 3196: Playback: CMJPlayerCore::GetOutputFormat: Using input format
0013338: 5108: Playback: CJRPlaybackEngine::StartPlayFile: Finish (296 ms)
0013354: 3196: Playback: CMJPlayerCore::GetOutputFormat: AllowCustomOutputFormat - modifying input format
0013354: 5108: Playback: CJRPlaybackEngine::Play: StartPlayFile returned 1
0013369: 3196: Playback: CMJPlayerCore::GetOutputFormat: wFormatTag 1
0013369: 5108: Playback: CJRPlaybackEngine::Play: Finish (359 ms)
0013385: 3196: Playback: CMJPlayerCore::GetOutputFormat: nChannels 2
0013385: 5108: Playback: CPlayerZone::Play: Play succeeded
0013400: 3196: Playback: CMJPlayerCore::GetOutputFormat: nSamplesPerSec 44100
0013400: 5108: Playback: CPlayerZone::Play: Finish (483 ms)
0013416: 3196: Playback: CMJPlayerCore::GetOutputFormat: nAvgBytesPerSec 176400
0013416: 5108: Playback: CPlayerZone::Next: Applying database changes
0013432: 3196: Playback: CMJPlayerCore::GetOutputFormat: nBlockAlign 4
0013432: 5108: Playback: CPlayerZone::Next: Finish (624 ms)
0013447: 3196: Playback: CMJPlayerCore::GetOutputFormat: wBitsPerSample 16
0013463: 3196: Playback: CMJPlayerCore::GetOutputFormat: cbSize 0
0013478: 3196: Playback: CMJPlayerCore::GetOutputFormat: Finish (156 ms)
0013510: 3196: Playback: CMJWaveFeeder::Thread: Preparing to feed data
0013525: 3196: Playback: CMJWaveFeeder::Thread: Running feeder loop
0020358: 4844: Database: CMediaInfoArraySort::Sort: Files: 31; Elapsed ms: 0.134
0020467: 5108: SDK: CMJCurPlaylistAutomation::CMJCurPlaylistAutomation: Global Count: 1
0020483: 5108: SDK: CMJPlaylistsAutomation::CMJPlaylistsAutomation: Global Count: 1
0020499: 5108: SDK: CMJPlaylistAutomation::CMJPlaylistAutomation: Global Count: 1
0020514: 5108: SDK: CMJPlaylistAutomation::OnFinalRelease: All objects released
0020530: 5108: SDK: CMJPlaylistAutomation::~CMJPlaylistAutomation: Global Count: 0
0020545: 5108: SDK: CMJPlaylistAutomation::CMJPlaylistAutomation: Global Count: 1
0020561: 5108: SDK: CMJPlaylistAutomation::OnFinalRelease: All objects released
0020577: 5108: SDK: CMJPlaylistAutomation::~CMJPlaylistAutomation: Global Count: 0
0020592: 5108: SDK: CMJPlaylistAutomation::CMJPlaylistAutomation: Global Count: 1
0020608: 5108: SDK: CMJPlaylistAutomation::OnFinalRelease: All objects released
0020623: 5108: SDK: CMJPlaylistAutomation::~CMJPlaylistAutomation: Global Count: 0
0020686: 5108: SDK: CMJPlaylistsAutomation::OnFinalRelease: All objects released
0020701: 5108: SDK: CMJPlaylistsAutomation::~CMJPlaylistsAutomation: Global Count: 0
0020717: 5108: SDK: CMJCurPlaylistAutomation::OnFinalRelease: All objects released
0020733: 5108: SDK: CMJCurPlaylistAutomation::~CMJCurPlaylistAutomation: Global Count: 0
0034117: 5108: Playback: CPlayerZone::Stop: Start
0034133: 5108: Playback: CPlayerZone::Stop: Checking for not loaded playback engine
0034149: 5108: Playback: CPlayerZone::Stop: Firing stop to playback engine
0034695: 5108: Playback: CMJPlayerCore::Stop: Start
0034710: 5108: Playback: CMJPlayerCore::Stop: Pausing playback to stop sound
0034726: 5108: Playback: CMJPlayerCore::Stop: Stopping visualization data thread
0034773: 5108: Playback: CMJPlayerCore::Stop: Closing feeder thread
0034788: 5108: Playback: CMJWaveFeeder::~CMJWaveFeeder: Start
0034804: 5108: Playback: CMJWaveFeeder::~CMJWaveFeeder: Cancel
0034819: 5108: Playback: CMJWaveFeeder::~CMJWaveFeeder: Stopping thread
0035709: 3196: Playback: CMJWaveFeeder::Thread: Finished feeder loop (bCancel: 1)
0035740: 3196: Playback: CMJWaveFeeder::Thread: Finish (22511 ms)
0035771: 5108: Playback: CMJWaveFeeder::~CMJWaveFeeder: Deleting input source
0035787: 5108: Playback: CMJWaveFeeder::~CMJWaveFeeder: Unloading DLL
0035802: 5108: Playback: CMJWaveFeeder::~CMJWaveFeeder: Finish (1014 ms)
0035833: 5108: Playback: CMJPlayerCore::Stop: Closing main output bin
0035849: 5108: Playback: CWaveOutBinPlayThread::~CWaveOutBinPlayThread: Start
0035865: 4916: Playback: CWaveOutBinPlayThread::Thread: Finish (436008 ms)
0035880: 5108: Playback: CWaveOutBinPlayThread::~CWaveOutBinPlayThread: Finish (31 ms)
0035911: 5108: Playback: CMJPlayerCore::Stop: Closing rights object
0035927: 5108: Playback: CMJPlayerCore::Stop: Deleting output plugin
0035943: 5108: Playback: CWASAPIPlugin::Flush: Start
0035958: 5108: Playback: CWASAPIPlugin::Flush: Stopped audio client (hr: 0x1)
0035989: 5108: Playback: CWASAPIPlugin::Flush: Reset audio client (hr: 0x0)
0036005: 5108: Playback: CWASAPIPlugin::Flush: Reset audio render client buffer (hr: 0x0)
0036021: 5108: Playback: CWASAPIPlugin::Flush: Retrieved current buffer information (hr: 0x0) (padding blocks: 67584)
0036036: 5108: Playback: CWASAPIPlugin::Flush: Finish (93 ms)
0036067: 5108: Playback: CMJPlayerCore::Stop: Updating play state
0036083: 5108: Playback: CMJPlayerCore::Stop: Finish (1388 ms)
0036114: 5108: Playback: CPlayerZone::Stop: Processing internal previous / next
0036130: 5108: Playback: CPlayerZone::Stop: Clearing display info
0036161: 5108: Playback: CPlayerZone::Stop: Updating statistics
0036177: 5108: Playback: CPlayerZone::Stop: Updating playback state
0036192: 5108: Playback: CPlayerZone::Stop: Updating UI
0036208: 5108: Playback: CPlayerZone::Stop: Applying database changes
0036239: 5108: Playback: CPlayerZone::Stop: Finish (2122 ms)
0036255: 5108: General: CMainUIWnd::Resize: Start
0036317: 5108: General: CMainUIWnd::Resize: Finish (62 ms)
0036629: 5108: General: CMCResourceHelper::GetIsModalPopupShowing: Menu showing
0037830: 5108: General: CMCResourceHelper::GetIsModalPopupShowing: Menu showing
0042838: 5108: General: CMCResourceHelper::GetIsModalPopupShowing: Menu showing
0045396: 5108: Podcast: CPodcastScheduler::Update: Start
0045412: 5108: Podcast: CPodcastScheduler::Update: Processing completed work threads
0045427: 5108: Podcast: CPodcastScheduler::Update: Purging files
0045443: 5108: Podcast: CPodcastScheduler::Update: Scheduling downloads
0045474: 5108: Podcast: CPodcastScheduler::ScheduleDownload: Start
0045490: 5108: Podcast: CPodcastFeed::AnalyzeFeedAndEpisodes: Start

... [REMOVED]

0046551: 5108: Podcast: CPodcastScheduler::ScheduleDownload: No work found
0046566: 5108: Podcast: CPodcastScheduler::ScheduleDownload: Finish (1092 ms)
0046582: 5108: Podcast: CPodcastScheduler::Update: Finish (1186 ms)
0046597: 5108: General: CMCResourceHelper::GetIsModalPopupShowing: Main window disabled
0046613: 5108: General: RunProgram: Start
0046629: 5108: General: RunProgram: Filename: C:\Users\tolga\AppData\Roaming\J River\Media Center 14\Log.txt / Parameters:
0046644: 5108: General: RunProgram: Performing ShellExecute...
0046707: 5108: General: RunProgram: Running process...
0046722: 5108: General: RunProgram: Finish (109 ms)
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: looping at the end of a song
« Reply #7 on: March 15, 2010, 07:25:02 pm »

Hmm... I don't know what to say.

The cross-fade feature is known to not work when the files' sample rate varies, but normally that can be fixed by setting MC to use a fixed sample rate, as you have now done.

In addition, I was going to suggest to set Channels to "2 channels (stereo)", but you have done also that.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Tolga

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 438
Re: looping at the end of a song
« Reply #8 on: March 15, 2010, 07:54:56 pm »

One more piece of information. Looping does happen when MC moves to the next song, but it does not happen if I skip to the next song. This suggests to me that the problem is not in the hardware per se. I must also note that I am running 2sec gap between songs, not the cross fader. I think MC starts working on the second song prematurely (it could work on it during the gap) and messes up with the playback of the last second of the last song, but that's just a guess.

And this seems to be important, the problem disappears with gapless playback, but it comes back with 2sec gap. It is as if MC does not tell the sound card to go into silence during the gap (or maybe the sound card does not get it).

Logged

Tolga

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 438
Re: looping at the end of a song
« Reply #9 on: March 15, 2010, 08:07:28 pm »

More data. I increased the gap to 16s and it looped for 16 secs. I think for certain cards, MC should flush the sound card data before getting into a gap.
Logged
Pages: [1]   Go Up