Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Voice Box updates

Re: Voice Box updates

From: Brian Wolven <bcwolven_at_jhu.edu>
Date: 2005-11-01

Jens Arnold wrote:
> On 01.11.2005, Brian Wolven wrote:
>
>> extension = LCase(Right(Name,3))
>
>> If ((extension="mp3") or _
>> (extension="m3u") or _
>> (extension="flac") or _
>> (extension="ogg") or _
>> (extension="wav") or _
>> (extension="m4a") or _
>> (extension="mp4") or _
>> (extension="cfg")) Then
>
>> isVoiced = true
>
>> End If
>
> That'll never match .flac files, because "extension" will be "lac"
> for these ;) On a related note, I think it's better to include
> the dot when checking for extension. Furthermore some extensions
> are missing, even for the archos.

Probably because I don't have any files of that type. And you know what
they say - there are three types of people in the world, those that can
count, and those who can't. =P

> My suggestion would be as follows:
>
>
> extpos = InStrRev(Name, ".")
>
> If (extpos > 0 and extpos < Len(Name)) Then
>
> extension = LCase(Mid(Name, extpos + 1))
>
> If ((extension = "mp2") or _
> (extension = "mp3") or _
> (extension = "mpa") or _
> (extension = "m3u") or _
> (extension = "cfg") or _
>
> (extension = "mp1") or _
> (extension = "ogg") or _
> (extension = "mpc") or _
> (extension = "a52") or _
> (extension = "ac3") or _
> (extension = "mp4") or _
> (extension = "wav") or _
> (extension = "flac") or _
> (extension = "m4a") or _
> (extension = "wv")) Then
>
> isVoiced = true
> End If
> End If

Works for me. Consider it committed.

> Ideally, the script should also be configurable for archos or iriver.
> The extensions valid for both cases are clearly separated from
> the ones only valid for iriver in my suggestion.

Hrmmm, configurable in what manner, exactly? If people want to stick
FLAC files on their Archos and have them voiced, shouldn't we do it -
even if they can't actually be played? Or am I perhaps missing your
point (haven't finished first cup of coffee yet...). Is there something
different in the way that voicing is (or will be) supported on the
iRiver? I don't have one, so I haven't paid much attention to those threads.
Received on Tue Nov 1 15:29:23 2005


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa