Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  How to keep 'no artwork' conditional viewport from briefly appearing?
« previous next »
  • Print
Pages: [1] 2

Author Topic: How to keep 'no artwork' conditional viewport from briefly appearing?  (Read 2631 times)

Offline Carson Dyle

  • Member
  • *
  • Posts: 80
How to keep 'no artwork' conditional viewport from briefly appearing?
« on: February 02, 2011, 05:03:52 PM »
I've created a WPS for the Sansa Fuze v2 similar to many out there, having artwork on the left and a viewport with track info text immediately to its right.  What I see on my Fuze when I skip a track is that the 'no artwork' viewport always appears for some brief time before the artwork appears and appears to shift the track info text to the right.

Can that behavior be avoided somehow?  I understand that Rockbox doesn't immediately know whether the artwork is available.

Here's the relevant code. The two track info viewports are defined as the last things in the wps file.

Code: [Select]
# Preload images, cover
%xl(A,battery.bmp,0,0,23)
%xl(B,repeat.bmp,0,0,4)
%xl(C,shuffle.bmp,27,0)
%xl(D,hold.bmp,47,0)
%xl(E,pbstatus.bmp,0,0,3)
%Cl(0,0,85,85,c,c)

# Conditional viewports
%?C<%Vd(a)|%Vd(b)>            # Track info, with and without cover
%?mv(2)<%Vd(d)|%Vd(c)>        # Volume bar/progress bar
%?Fn<%Vd(e)>                  # Next track info
%?cc<%Vd(f)>                  # Clock

# Track info, with cover
%Vl(a,4,43,85,85,-)
%Cd
%Vl(a,93,43,124,70,5)%Vf(ffffff)
%s%al%?it<%it|%fn>
%s%al%?ia<%ia|%?d(2)<%d(2)|%(root%)>>
%s%al%?id<%id|%?d(1)<%d(1)|%(root%)>>
%Vl(a,93,113,124,15,3)%Vf(ffffff)
%s%al%?iy<%iy>%ar

# Track info, no cover
%Vl(b,4,43,212,70,5)%Vf(ffffff)
%s%al%?it<%it|%fn>
%s%al%?ia<%ia|%?d(2)<%d(2)|%(root%)>>
%s%al%?id<%id|%?d(1)<%d(1)|%(root%)>>
%Vl(b,4,113,212,15,3)%Vf(ffffff)
%s%al%?iy<%iy>%ar
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #1 on: February 02, 2011, 07:21:06 PM »
No, there is no way to avoid this.

For a brief period while switching tracks, until the check for AA becomes "true", it is "false" and will show the false case.

It is usually an incredibly brief, almost unnoticeable period (in my experience) though.



[St.]
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline Carson Dyle

  • Member
  • *
  • Posts: 80
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #2 on: February 02, 2011, 07:40:43 PM »
Ok, thanks. I don't see it at all when running on the emulator on my PC, but it's definitely noticeable on the Fuze.

What if... AA were assumed "true" by default instead of the other way around?  I know it would just give the opposite behavior, causing shifting viewports when there's no album art, but wouldn't it be a fairly safe assumption that most people nowadays do take the trouble to have artwork for most tracks?
Logged

Offline lilwire

  • Member
  • *
  • Posts: 5
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #3 on: February 02, 2011, 08:35:20 PM »
Quote from: Carson Dyle on February 02, 2011, 07:40:43 PM
What if... AA were assumed "true" by default instead of the other way around?  I know it would just give the opposite behavior, causing shifting viewports when there's no album art, but wouldn't it be a fairly safe assumption that most people nowadays do take the trouble to have artwork for most tracks?
Your logic sounds good, I like the idea  ;) (I'm also a victim of this lag) Hopefully some dev with the knowledge can make this more clear
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #4 on: February 03, 2011, 01:44:24 AM »
untill AA is found the wps is going to assume there isnt one (you can ever prove the non-existance of something).

if you always want to show AA why not setup an dummy cover image and use that for when a track has no AA?

Or another option is always displaying something completly different for the first few seconds of the track using %?pS(3)<>
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline Carson Dyle

  • Member
  • *
  • Posts: 80
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #5 on: February 03, 2011, 05:34:39 AM »
Quote from: JdGordon on February 03, 2011, 01:44:24 AM
untill AA is found the wps is going to assume there isnt one (you can ever prove the non-existance of something).

Nobody is looking for a mathematical proof.  Only saying that it's just as easy (and equally valid) to assume the opposite condition until you actually know which is which.

Quote
if you always want to show AA why not setup an dummy cover image and use that for when a track has no AA?

But you don't want to always show artwork.  If indeed there is no image then you want to maximize the space used for the text display.

Quote
Or another option is always displaying something completly different for the first few seconds of the track using %?pS(3)<>

That's a possibility, but it shouldn't be necessary.

Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #6 on: February 03, 2011, 05:45:26 AM »
Quote from: Carson Dyle on February 03, 2011, 05:34:39 AM
Quote from: JdGordon on February 03, 2011, 01:44:24 AM
untill AA is found the wps is going to assume there isnt one (you can ever prove the non-existance of something).

Nobody is looking for a mathematical proof.  Only saying that it's just as easy (and equally valid) to assume the opposite condition until you actually know which is which.

Sure that's possible, but is it better? That would have exactly the same issue for tracks without AA
Logged

Offline Yotto

  • Artist
  • Member
  • *
  • Posts: 826
  • Every Silver Lining has a Cloud
    • My Blog
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #7 on: February 03, 2011, 03:54:36 PM »
I have AA for a lot of my music, but far from all. I don't think I'm in a minority on that second point. Having some funky flash of a blank viewscreen before the alternate information (which I always have in place of AA) would really annoy me when AA wasn't present.

In fact, it would be worse than the situation now, because the non-AA screen in my themes always has something on it to look at. Why have a huge chunk of the screen be totally blank for a second or two?
Logged
Pulp Audio Weekly - Where we talk about News, Reviews, and pretty much anything else we feel like discussing.

Offline TexasRockbox

  • Member
  • *
  • Posts: 267
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #8 on: February 03, 2011, 04:18:06 PM »
Why not check for the existence of Album Art before displaying anything?  That is, keep the previous WPS.  Of course that change will affect the overall responsiveness of displaying the WPS.

Or....

The themes are editable.  If you're like me and use album art, I just delete the "no-album art" code from the theme, problem solved.
Logged
Cowon X5L 240GB.  Rockbox 3.9.1  File browser with dircache, .flac -8  using both batteries! Samsung Player 5.0 Android 2.3.5 RaaA (Rasher daily build) .ogg -q7 & -q8

Offline Carson Dyle

  • Member
  • *
  • Posts: 80
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #9 on: February 03, 2011, 04:24:42 PM »
Quote from: TexasRockbox on February 03, 2011, 04:18:06 PM
The themes are editable.  If you're like me and use album art, I just delete the "no-album art" code from the theme, problem solved.

That might be the best approach.  The only problem with it is that I find that Rockbox misses a fair number of covers for some reason.  Not a large number, but it's definitely an issue.
Logged

Offline TexasRockbox

  • Member
  • *
  • Posts: 267
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #10 on: February 03, 2011, 04:38:08 PM »
Never had a problem (that wasn't because of an error in coding of a theme).  Mine are all named "cover.jpg" and reside within the subdirectory as the music files.  Organized: Music\<artist>\<album>\<files>
Logged
Cowon X5L 240GB.  Rockbox 3.9.1  File browser with dircache, .flac -8  using both batteries! Samsung Player 5.0 Android 2.3.5 RaaA (Rasher daily build) .ogg -q7 & -q8

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #11 on: February 03, 2011, 05:57:04 PM »
Quote from: TexasRockbox on February 03, 2011, 04:18:06 PM
The themes are editable.  If you're like me and use album art, I just delete the "no-album art" code from the theme, problem solved.

Not quite...in fact, not at all actually.

Like JdGordon said previously, until AA is actually found it's not possible for the case to be true.

Removing the false condition from the statement won't prevent this.


[St.]
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline lilwire

  • Member
  • *
  • Posts: 5
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #12 on: February 03, 2011, 06:31:18 PM »
Quote from: [St.] on February 03, 2011, 05:57:04 PM
Quote from: TexasRockbox on February 03, 2011, 04:18:06 PM
The themes are editable.  If you're like me and use album art, I just delete the "no-album art" code from the theme, problem solved.

Not quite...in fact, not at all actually.

Like JdGordon said previously, until AA is actually found it's not possible for the case to be true.

Removing the false condition from the statement won't prevent this.


[St.]

I believe you probably didn't understand what TexasRockbox meant: what he suggests (or at least that's what I tried on a couple themes, and it works) is removing the conditional, and making the theme behave always like there's album art present; in that way, the problem will only be noticed by the fact that the album art will only be displayed after the said delay; the text etc would not be re aligned. That's a fair solution if in fact there always is album art present... because when there isn't, the theme will not look good.
Logged

Offline [Saint]

  • Rockbox Expert
  • Member
  • *
  • Posts: 1662
  • Hayden Pearce
    • Google+
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #13 on: February 04, 2011, 02:26:26 AM »
Yes, well...that is indeed an option, though I wasn't looking at it that way, as assuming that there will always be AA present is an unbelievably broken way of "fixing" this issue.


[St.]
Logged
Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline Carson Dyle

  • Member
  • *
  • Posts: 80
Re: How to keep 'no artwork' conditional viewport from briefly appearing?
« Reply #14 on: February 04, 2011, 02:33:04 AM »
Quote from: [St.] on February 04, 2011, 02:26:26 AM
Yes, well...that is indeed an option, though I wasn't looking at it that way, as assuming that there will always be AA present is an unbelievably broken way of "fixing" this issue.

Granted, if you're going publish the WPS then you have to account for the possibility of not having artwork.  But if it's for your own use, who cares?
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  How to keep 'no artwork' conditional viewport from briefly appearing?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.116 seconds with 14 queries.