Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Sound stuttering badly at page change over  (Read 8605 times)

0 Members and 1 Guest are viewing this topic.

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Sound stuttering badly at page change over
« on: October 14, 2009, 05:08:33 pm »
Hi Chris,

I have been designing an album skin for a while now, however if music is playing and i try to change pages quickly, the music stutters all over the place. The problem never appears in a standard artist skin, but i think its happened in other album skins to my own. Once my skin is finished i hope to send it to you in hope its good enough for your website.

I have attached the.. AS IS, unfinished skin.. with temporary buttons etc. and hope you can get the sound stuttering too and see if you know what it is i have done wrong.

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #1 on: October 14, 2009, 07:03:35 pm »
The problem is very unlikely to be in the skin.  The usual cause of this is an underpowered system, underpowered video card, or oversized album cover images.  I put some fixes in for these sorts of issues a couple versions back, though.

Go into jukebox.ini and set DebugLevel=2 and run the program, switch a couple of pages to cause the issue, then post or E-mail the resulting jbdebug.log file so I can see if there is anything going on.

Thanks!

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #2 on: October 15, 2009, 06:29:20 am »
ARGH! it mucked up my post  :angry:

ok.. from the start! This is probably the bit you want, however attached the whole thing. I saw someone else had this problem, and i think you managed to fix it. I'm running Vista SP2 Home Premiun. 4Gb RAM 3.0Ghz AMDx2. Although this isn't the machine i plan to run it on eventually, i still had this problem on that machine when i last tried it.

0:00:15.88,1,SONG_START,"Starting song Voodoo Child (Slight Return) (, type 1"
0:00:44.46,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 20 ticks"
0:00:45.97,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 20 ticks"
0:00:46.36,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 21 ticks"
0:00:49.95,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 20 ticks"
0:00:55.38,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 22 ticks"
0:00:57.10,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 20 ticks"
0:00:57.39,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 29 ticks"
0:00:58.03,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 21 ticks"
0:01:00.77,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 29 ticks"
0:01:03.23,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 20 ticks"
0:01:04.07,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 20 ticks"
0:01:04.47,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 25 ticks"
0:01:06.90,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 23 ticks"
0:01:10.96,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 29 ticks"
0:01:11.77,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 29 ticks"
0:01:12.74,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 22 ticks"
0:01:14.50,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 21 ticks"
0:01:14.73,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 23 ticks"
0:01:19.85,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 20 ticks"
0:01:28.73,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 20 ticks"
0:01:28.99,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 26 ticks"
0:01:29.86,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 30 ticks"
0:01:30.81,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 20 ticks"
0:01:34.36,1,JB_SONG_POLL,"CAUTION: Song buffer not updated for 20 ticks"
0:01:36.46,1,MQ_PROCESS,"Jukebox shutdown requested via BTN_SHUTDOWN (system shutdown not enabled)"

Thank you again for your great software and on going support for it.

David
« Last Edit: October 15, 2009, 06:32:08 am by david656 »

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #3 on: October 15, 2009, 05:37:57 pm »
It sounds like it is not getting enough CPU..... is anything else running that is using a lot of CPU?

Can you kick DebugLevel up to 3 and try it again so I can get a bit more info?

Thanks!

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #4 on: October 15, 2009, 06:58:28 pm »
Hi Chris,

Thanks again for looking into this i really appreciate it. I have attached a debug lvl 3. the CPU is set to a 100 in the settings and i have checked the Ctrl Alt Del menu and CPU usage before i load the program is about 2/3% with 900mb out of the 4gb ram used.

An interesting fact is if i set animation to 0 its fine, however i like the scrolling album art and would like to keep the animation if possible.

thanks again

David

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #5 on: October 15, 2009, 08:25:20 pm »
It looks as if your system is unusually slow moving items to and from video memory.  Ordinarily I would say that it was an issue loading images from disk but the problem happens going backwars too when the disk images should be cached.

If you drop the resolution to 800x600 at 16 bit color depth, does the problem get any better?  (This is not a proposed solution, just a test.)
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #6 on: October 15, 2009, 09:15:03 pm »
yeh the problem gets better.

my hard drive is 500gb with 470gb full. might need a defrag.

what i will do tomorrow is a test by copying the 'dwjuke' folder to another well kept, almost empty XP computer and see if the problem persists.

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #7 on: October 15, 2009, 09:21:45 pm »
If that makes it better it's not a disk issue, it's a video card issue.  Does that system have an integrated video chipset?
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #8 on: October 16, 2009, 11:07:00 am »
nope NVIDIA GeForce 8500 GT 256mb PCI-E (heatpipe quat-tech..or something like that)

However the machine i will be running it on is an Giga-byte Intel Atom board with intel integrated graphics.

thanks again for the support

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #9 on: October 16, 2009, 11:48:09 pm »
Well, it is not unheard of for great 3D cards to have poor 2D support.

I'm going to have to think about how I can duplicate this issue at home so I can solve it.  I have a GeForce 8500 Pro but I am not seeing the issue.
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #10 on: October 17, 2009, 04:30:57 am »
 :cheers: thank you for all your support on this!

great graphics card!, its not the best. I will test it on my other computer today and maybe post the debug log from that machine.

It is also the computer fair this weekend, so maybe a new graphics card is in order.

I hope to get this sorted as much as you.

thanks again

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #11 on: October 17, 2009, 11:09:52 am »
just to let you know.. tried it on a health XP with a NVIDIA 7600GT and same issue with both my and one of the preset album skins. the error message was slightly different in that it said 'next page delayed due to re processing' in the debug log

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #12 on: October 17, 2009, 01:06:35 pm »
What data rate are your songs generally encoded at?
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #13 on: October 19, 2009, 04:32:39 am »
well anything from 128 to 320.

Once i have it set up i intend to beg for flac support as i have started to back all my albums up in flac format.

thanks again

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #14 on: October 19, 2009, 03:49:46 pm »
I've put up a beta executable at http://www.dwjukebox.com/releases/dwj304beta.zip ... can you try that with DebugLevel set to 3 and let me know if it seems to make a difference?

Thanks!

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #15 on: October 19, 2009, 05:36:10 pm »
Never mind that beta... I think I found the bottleneck and it wasn't where I was expecting it.  I'm pulling it apart now.
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #16 on: October 19, 2009, 06:24:08 pm »
Ooo  ;D

Well, i'll be interested to hear your outcome  :) and will also be making a donation! its the least i can do after all your help and support....once the problems fixed of course  ;D

thanks again for looking into this, it is nice to know you care about your user base.

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #17 on: October 19, 2009, 09:30:59 pm »
OK, now try http://www.dwjukebox.com/releases/dwj304beta.zip ... I've made a change that seems to make a a huge difference for album animations.
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #18 on: October 19, 2009, 09:53:28 pm »
Here's a comparison of the logs for starting an animation on a 1920x1080, 32bpp display: (NOTE: A tick is a hundredth of a second)

Version 3.3.2:

0:00:12.80,3,MQ_PROCESS,"Processing message: BTN_NEXTPG"
0:00:12.80,5,TURNPAGE,"Eff. Anim spd: 20   Turncount: 3"
0:00:12.82,4,ARTCACHE,"Found cached pointer #13 (2000428)"
0:00:12.82,4,ARTCACHE,"Found cached pointer #13 (2000428)"
0:00:12.82,4,ARTCACHE,"Found cached pointer #13 (2000428)"
0:00:12.82,4,ARTCACHE,"Created cache entry #14 (2a66008)"
0:00:12.84,5,TURNPAGE,"Dialog draw time to bgimage: 4 ticks"
0:00:14.14,5,TURNPAGE,"Page draw time: 134 ticks "


Version 3.4 beta:

0:00:06.00,3,MQ_PROCESS,"Processing message: BTN_NEXTPG"
0:00:06.03,5,TURNPAGE,"Eff. Anim spd: 20   Turncount: 3"
0:00:06.04,4,ARTCACHE,"Found cached pointer #13 (1f47ac8)"
0:00:06.05,4,ARTCACHE,"Found cached pointer #13 (1f47ac8)"
0:00:06.05,4,ARTCACHE,"Found cached pointer #13 (1f47ac8)"
0:00:06.05,4,ARTCACHE,"Created cache entry #14 (1f489d8)"
0:00:06.07,5,TURNPAGE,"Dialog draw time to bgimage: 4 ticks"
0:00:06.08,5,TURNPAGE,"Page draw time: 5 ticks"

--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #19 on: October 20, 2009, 03:04:42 am »
what a difference! I've had about a minute to test it but will try more later!

there's the slightest tick occasionally ... may have been the song anyway.

What was it that caused such a problem?

Again thank you for taking time out to sort this

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #20 on: October 20, 2009, 03:37:30 pm »
what a difference! I've had about a minute to test it but will try more later!

there's the slightest tick occasionally ... may have been the song anyway.

What was it that caused such a problem?

Again thank you for taking time out to sort this

If it "ticks" when you have DebugLog set at 3 or higher, please send me the log... I can't imagine where it is still catching, if it is the jukebox and not the song.

When I draw the animations, data from both the previous page and the next page are visible.  What I do is change the page number internally, egenerate the page, but when it is time to refresh the GUI I redirect the GUI output to memory so the screen doesn't change.  I then made a copy of the existing screen to another memory buffer, and over the course of the animation, portions of both memory buffers are used to build the display. 

The problem was in copying the existing screen to memory.  Reading an image from the screen and copying back to the computer is incredibly slow.  I knew it was slower than a regular memory read but never imagined that the difference was that dramatic; it is only now that I have a widescreen high-res monitor myself that I am starting to see it.  So now I redirect the GUI to memory BEFORE updating the page, refresh it to one buffer, update the screen, then refresh it to a second buffer so I don't have to copy from the screen anymore.
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #21 on: October 20, 2009, 06:48:42 pm »
the tick has suddenly gone, probably the song.

OK, i think i understand the issue  ;D. basically.. there was a lot going on at once?!?

Again thank you for looking into this! its allowed me to continue with my jukebox project :)

Not to be cheeky but when can we expect flac support?

cheers.

PS: have now donated through (nicola) and your donation button on your website :-)
« Last Edit: October 20, 2009, 06:52:13 pm by david656 »

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #22 on: October 20, 2009, 11:03:17 pm »
OK, i think i understand the issue  ;D. basically.. there was a lot going on at once?!?

Well, it is specifically a matter of copying from video memory to the system... apparently modern 3D cards are optimized to have the data flow the other direction...

Quote
Again thank you for looking into this! its allowed me to continue with my jukebox project :)

Thank you for helping me find the issue! It made a huge difference in album-skin animation for everyone.

Quote
Not to be cheeky but when can we expect flac support?
I have a library for it; I have started looking into what it would take to integrate it.

Quote
PS: have now donated through (nicola) and your donation button on your website :-)
Thank you very much... I truly appreciate it!
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #23 on: October 21, 2009, 08:31:57 am »
Maybe that's why I thought, "I swear my old NVIDIA didn't have this problem!"

It sounds like everyone is a winner  ;D But have you updated the download on your website?

Great! can't wait to hear more about the flac support.

 :cheers:

PS: If i finish that skin, would you like a copy? i have also made a matching skin for SimpleTouch FE, that also isn't finished!

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #24 on: October 29, 2009, 12:23:00 am »
I've hacked in some FLAC support and it works, sort of. It took 90 seconds to load a song and crashed 3/4 of the way through. I think the FLAC wrapper I am using was meant for small samples, not full songs. So I am probably going to have to write directly against the FLAC library, meaning it'll take time rather than being a simple drop-in.
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #25 on: October 29, 2009, 07:47:55 am »
Hi,

Great to hear that you are making progress  ;D

Would it be possible to get a copy of wincab with the flac support you have? as i would like to make sure all my albums are named correctly and look ok in my skin  :)

thanks again

David

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #26 on: November 03, 2009, 08:09:42 am »
Hi,

Great to hear that you are making progress  ;D

Would it be possible to get a copy of wincab with the flac support you have? as i would like to make sure all my albums are named correctly and look ok in my skin  :)

thanks again

David
Unfortunately, even that rudimentary support is enough to prevent the DOS version from compiling.   This is probably going to be enough to prevent me from supporting FLAC unless I can find a truly cross-platform library for it.
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #27 on: November 05, 2009, 01:13:58 pm »
Hi,

I may be well out here, but SKJukebox has flac support yet uses windows media player as its base. Does it work totally different to wincab?

thanks again for looking into this, it will be a real shame if flac support isn't a viable feature any time soon

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Sound stuttering badly at page change over
« Reply #28 on: November 05, 2009, 04:25:00 pm »
Yes, quite different... DWJukebox supports both DOS and Windows ("DWJukebox", in fact. is short for "DOSCab and WinCab Jukebox", with DOSCab Jukebox being its original name representing its purpose for DOS-based MAME cabinets) so using Windows Media Player as it's base would not be feasible.  In fact, the only reason DWJukebox exists is because at the time I started work on it seven years ago there was no viable jukebox available for DOS and I needed one.
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

david656

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 485
  • Last login:June 01, 2017, 10:06:24 am
  • Big Man!
Re: Sound stuttering badly at page change over
« Reply #29 on: November 16, 2009, 08:29:54 pm »
Yeh,

I've used your software for quite some time, i tried the DOS version a while ago, and use the windows version on my arcade machine.

I hope that at some point you manage to add flac support as it would be a brilliant asset to a brilliant piece of software.

In the mean time, which format would you recommend? mp3 320kb/s?  What is ogg. i have a few tracks in that format

Again thanks for looking into this.