Rockbox Development > Feature Ideas

"Fade on stop/pause" duration control (was: Plug-in for audio fade?)

<< < (8/10) > >>

soap:
Rockbox does not tend to do build-time options.  (Though one could obviously tweak the code in such a manner.)

What it sounds like an agreeable option for you would be is to expand on the previously discussed "Fade on stop / pause" option.  An expansion which expanded the length of fade and added an option to Fade on stop / pause, play, or both .

Does this sound like the idea in a nutshell?  (Not saying it will get done, but at least we can clearly define the goal)?

chrisjj:
> What it sounds like an agreeable option for you would be is to expand on the previously discussed "Fade on stop /
> pause" option.  An expansion which expanded the length of fade and added an option to Fade on stop / pause, play, or both .
>
> Does this sound like the idea in a nutshell?

That would certainly meet my requirements.

But perhaps the following would simpler and meet more of the requirements of others:

Setting for duration of "Fade on stop/pause" up
Setting for duration of "Fade on stop/pause" down.

And perhaps the same time would be a good time to improve both the UI label "Fade on stop/pause" and the CGF label "volume fade", changing to "Fade on stop/pause/play."

> (Not saying it will get done, but at least we can clearly define the goal)?

Sure!

soap:
Ok, I don't feel the meta discussion on quoting is needed, nor appropriate, in this thread and I'm going to shit-can it.

Quote abuse (or lack of quoting) is such a rare event that I also don't feel it needs stickied, and suggest that staff PM "offenders" in the future and not clutter an otherwise functional thread.

Two posts on the quoting topic is sufficient.  Eight is outright silly.

Edit:  PM me if you have good reason to see this thread unlocked.  I personally feel the original topic has reached a conclusion / agreement.

chrisjj:

--- Quote from: chrisjj on April 27, 2010, 07:19:01 AM ---I want a command (e.g. single keypress) that when issued triggers RB to do a fade to silence. I.e. to take the volume of the audio steadily down to zero.

--- End quote ---

It seems Crossfade on manual would do this for me https://archive.is/KEfsp#selection-515.0-520.0 . However crossfade seems brokens at the moment http://forums.rockbox.org/index.php/topic,51605.0.html .

Bilgus:
And A lua x-mas present for you as well  :D


--- Code: -----Bilgus 12-2016
TIMEOUT = rb.HZ/4
SOUND_VOLUME = 0 --This is a CONSTANT
local vol_min = -60 --rb.sound_min(SOUND_VOLUME)

function cfg_num_setting(str_name)
local file = io.open(rb.ROCKBOX_DIR .. "/config.cfg", "r")
    if not file then
        return nil
    end
local value = nil
local contents = file:read("*all")

    i, j = string.find(contents, str_name .. ":")
    if j ~= nil then
        file:seek ("set", rb.atoi(j))
        value = file:read ("*num")
    end
    file:close() -- GC takes care of this if you would've forgotten it
    return value
end

local volume = cfg_num_setting("volume")
    if volume == nil then
        volume = rb.sound_default(SOUND_VOLUME)
    end

local vol_orig = volume


    if rb.pcm_is_playing() then
        while (volume > vol_min) do
            rb.sleep(TIMEOUT)
            rb.yield()
            volume = volume - 1
            rb.sound_set(SOUND_VOLUME, volume);
        end
        rb.audio_pause()
        rb.sleep(rb.HZ)
        rb.sound_set(SOUND_VOLUME, vol_orig); -- Set back to original so it doesn't get overwritten in config.cfg
        os.exit()

    else
        volume = vol_min
        rb.sound_set(SOUND_VOLUME, volume);
        rb.sleep(rb.HZ)
        rb.audio_resume()
        while (volume < vol_orig) do
            rb.sleep(TIMEOUT)
            rb.yield()
            volume = volume + 1
            rb.sound_set(SOUND_VOLUME, volume);
        end
        rb.sound_set(SOUND_VOLUME, vol_orig);

        os.exit()
    end

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version