[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch (rather for discussion): sonic and samplerate implementation
From: |
Bohdan R . Rau |
Subject: |
Patch (rather for discussion): sonic and samplerate implementation |
Date: |
Tue, 07 Dec 2010 09:35:03 +0100 |
On Mon, 6 Dec 2010 20:33:14 +0100, Andrei Kholodnyi
<andrei.kholodnyi at gmail.com> wrote:
[...]
>> It was necessary to add some code to ivona.c (like UPDATE_PARAMETER).
>
> why? since it does nothing, why do you need it in ivona.c?
Hm... on my system these changes in ivona.c allows to change rate/pitch.
It was not implemented in original ivona.c, as Ivona-1 server does not
allow to change pitch and rate, and even new Ivona-2 (probably will be
never shipped for Linux) can't change pitch.
But may be I have non typical system ;)
>
>>> Function spd_audio_effect you have implemented should probably pass
>>> AudioTrack instead of samples.
>>
>> You mean somethink like:
>> int spd_audio_effect(AudioTrack *track,...)
>
> yes, something like
> AudioTrack * spd_audio_effect(AudioTrack *track,...)
> since you need an output as well.
Hm... I must rethink it (I don't think I like this solution).
But may be we should be more radical?
As we have only some modules - there is no problem to add some lines to
each module. For me it should be:
a) something like spd_audio_track_init(track) - fills all track structure
with zeroes
b) move third parameter of spd_audio_play into field in track structure
c) change second parameter od spd_audio_play from AudioTrack into
AudioTrack * so we can safely change size of AudioTrack structure
Then spd_audio_effect function could only manipulate some extended
AudioTrack fields (rate, pitch, contrast, may be equalizer...), and all
needed data manipulations would be done inside spd_audio_play?
There should be not too much work...
BTW regarding contrast:
I think changing contrast via speech-dispather API is not needed. In fact,
increasing contrast has meaning primarily with low-end audio system (my
Aspire One netbook is very good candidate as it has something strange
instead of speakers), so it may be left as parameter in module
configuration.
In other hand - we could make contrast with volume working together (it
has sense as contrast increases loudness) - for example (the value 80 is
taken as example only):
effective_volume=(volume>80)?80:volume; /* 80 means "maximum" */
effective_contrast=(volume>80)?5*(volume-80):0; /* or compute
effective_contrast with "comtrast" from module configuration and volume */
What's your opinion?
ethanak
--
http://milena.polip.com/ - Pa pa, Ivonko!
- Patch (rather for discussion): sonic and samplerate implementation, (continued)
- Patch (rather for discussion): sonic and samplerate implementation, Andrei Kholodnyi, 2010/12/04
- Patch (rather for discussion): sonic and samplerate implementation, Bohdan R . Rau, 2010/12/04
- Patch (rather for discussion): sonic and samplerate implementation, Andrei Kholodnyi, 2010/12/05
- Patch (rather for discussion): sonic and samplerate implementation, Bohdan R . Rau, 2010/12/06
- Patch (rather for discussion): sonic and samplerate implementation, Bohdan R . Rau, 2010/12/06
- Patch (rather for discussion): sonic and samplerate implementation, Andrei Kholodnyi, 2010/12/06
- Patch (rather for discussion): sonic and samplerate implementation, William Hubbs, 2010/12/06
- Patch (rather for discussion): sonic and samplerate implementation, Andrei Kholodnyi, 2010/12/06
- Patch (rather for discussion): sonic and samplerate implementation, Tomas Cerha, 2010/12/06
- Patch (rather for discussion): sonic and samplerate implementation, Bohdan R . Rau, 2010/12/07
- Patch (rather for discussion): sonic and samplerate implementation,
Bohdan R . Rau <=
- Patch (rather for discussion): sonic and samplerate implementation, Andrei . Kholodnyi, 2010/12/08
- Patch (rather for discussion): sonic and samplerate implementation, Bohdan R . Rau, 2010/12/06