From patrakov at gmail.com Wed Nov 19 08:20:24 2014
From: patrakov at gmail.com (Alexander E. Patrakov)
Date: Wed, 19 Nov 2014 21:20:24 +0500
Subject: [Speex-dev] Feature request: rewindable resampler
Message-ID: <546CC348.4010509@gmail.com>
Hello.
As you probably know, PulseAudio uses the resampler from libspeexdsp by
default. As a PulseAudio contributor, I have a feature request.
As you can see from old publications [1,2] by Lennart Poettering,
PulseAudio has a "timer-based scheduling" feature which is now active by
default. PulseAudio attempts to use as high latency as possible
(sometimes up to 2 seconds) in order to save power and reduce the chance
of dropouts. However, in order to stay responsive to events such as
software-volume changes or a new stream appearing, PulseAudio relies on
the ability to rewind over already-buffered but not-yet-played sound
data and replace them with a new version.
Also I must say that PulseAudio client API includes rewinds - i.e. any
client can say "please forget N samples that I wrote before, here is an
updated version".
Unfortunately, we cannot pass such rewind requests through a resampler,
simply because no open-source resampler library has an API to do this.
I.e. there is no way to forget N last input samples, replace them, and
figure out which output samples should be replaced with what. Currently,
in this situation, we just reset the resampler, which is wrong.
Also there are situations where it ends up wanting to reask for N last
output samples corresponding to a modified input where the input
modification can be produced on-demand and logically extends to negative
infinity in time. Usually, this happens when software-volume is applied
before the resampler and a volume-change event occurs. The same kind of
bug then happens: we cannot do anything better than resetting the
resampler. End result: users complain, see e.g. [3].
Could you please consider designing and implementing new speexdsp API
functions that would allow PulseAudio to get rid of these bugs?
In fact, because this request is, in my opinion, specific to PulseAudio
and ALSA (in ALSA - because of the need to implement snd_pcm_rewind()
for the rate plugin), I considered writing a new resampler from scratch
with this feature. However, I will almost certainly not start within the
next 3 months due to my dayjob and because of other TODO items, and
David Henningsson has hinted me to talk to you as an upstream of speex,
because, in his opinion, this "rewind" feature might be useful for other
applications. Hence this email :)
[1] http://0pointer.de/blog/projects/pulse-glitch-free.html
[2]
http://lac.linuxaudio.org/2010/download/lennarts-talk-auf-der-lac-2010.pdf
[3] https://bugs.freedesktop.org/show_bug.cgi?id=50113
--
Alexander E. Patrakov
From jakob.aagesen at mirsk.com Tue Nov 25 17:12:35 2014
From: jakob.aagesen at mirsk.com (Jakob Aagesen)
Date: Tue, 25 Nov 2014 17:12:35 -0000
Subject: [Speex-dev] speex wideband and ogg question
Message-ID: <1eabe38642e242d5a15a66ecd2154010@tangra.mirsk.dk>
Hi
My name i Jakob Aagesen
I have a problem understanding the granual pos in the ogg header. I found a something that Selon Ralph Giles wrote to someone:
What speexenc does (Speex itself does not know about Ogg) is that it gives
packet N the granulepos "N*frame_size - lookahead". In the case of narrowband,
the first frame would have granulepos "1*160 - 80", so 80.
What is the look-ahead for wideband speex.
I have this speex-ogg file that seems to be playing for 4.9 sec but it is only 2.9 sec long:
This is a picture of the speex and ogg headers: can you see if the granual pos is wrong in these headers. I was told that the last one is wrong, but I don't know why.
I would appreciate any help on the matter.
[cid:image006.png at 01D008DA.9C207550]
[cid:image007.png at 01D008DA.9C207550]
[cid:image008.png at 01D008DA.9C207550]
Best Regards,
Jakob Aagesen
Senior Developer B.Sc
E-mail: jakob.aagesen at mirsk.com
Mobile: (+45) 5059 9858
[mirsk_email_logo_icon]
MIRSK
Sturlasgade 12 H
DK-2300 Copenhagen S
Denmark
[Round_05_fb][Round_05_in][Round_05_tweet][Round_05_yt]
*Notice* This communication is from MIRSK Digital ApS. It contains information which is confidential and may also be privileged. It is for exclusive use of the intended recipient(s). NOTE: This e-mail is from MIRSK Digital ApS and is intended solely for the use of the individual(s) to whom it is addressed. If you believe you received this e-mail in error, please notify the sender immediately, delete the e-mail from your computer and do not copy or disclose it to anyone else. If you are not an existing client of MIRSK Digital ApS, do not construe anything in this e-mail to make you a client unless it contains a specific statement to that effect and do not disclose anything to MIRSK Digital ApS in reply that you expect it to hold in confidence. If you properly received this e-mail as a client, co-counsel or retained expert of MIRSK Digital ApS, you should maintain its contents in confidence in order to preserve the work or product privilege that may be available to protect confidentiality.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6347 bytes
Desc: image001.png
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 843 bytes
Desc: image002.png
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1174 bytes
Desc: image003.png
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 1180 bytes
Desc: image004.png
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 1249 bytes
Desc: image005.png
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 117477 bytes
Desc: image006.png
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 175517 bytes
Desc: image007.png
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 39514 bytes
Desc: image008.png
URL:
From jakob.aagesen at mirsk.com Thu Nov 27 14:14:06 2014
From: jakob.aagesen at mirsk.com (Jakob Aagesen)
Date: Thu, 27 Nov 2014 14:14:06 -0000
Subject: [Speex-dev] speexenc.exe problem
Message-ID:
Hi Jean
My name is Jakob Aagesen.
I'm using speexenc.exe when I record audio.
The problem I'm having is that when making a very small recording, speexenc gives me a file that is composed like shown in below picture:
[cid:image001.png at 01D00A54.B79880E0]
The granulepos say that the speex audio is 0.1360544 ms. long (granulepos/sample rate). The problem is that it seems that the audio is longer when played back.
Are there some obvious remarks or help you can give me on this problem?
I would be very happy if you could help me.
Best Regards,
Jakob Aagesen
Senior Developer B.Sc
E-mail: jakob.aagesen at mirsk.com
Mobile: (+45) 5059 9858
[mirsk_email_logo_icon]
MIRSK
Sturlasgade 12 H
DK-2300 Copenhagen S
Denmark
[Round_05_fb][Round_05_in][Round_05_tweet][Round_05_yt]
*Notice* This communication is from MIRSK Digital ApS. It contains information which is confidential and may also be privileged. It is for exclusive use of the intended recipient(s). NOTE: This e-mail is from MIRSK Digital ApS and is intended solely for the use of the individual(s) to whom it is addressed. If you believe you received this e-mail in error, please notify the sender immediately, delete the e-mail from your computer and do not copy or disclose it to anyone else. If you are not an existing client of MIRSK Digital ApS, do not construe anything in this e-mail to make you a client unless it contains a specific statement to that effect and do not disclose anything to MIRSK Digital ApS in reply that you expect it to hold in confidence. If you properly received this e-mail as a client, co-counsel or retained expert of MIRSK Digital ApS, you should maintain its contents in confidence in order to preserve the work or product privilege that may be available to protect confidentiality.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 18545 bytes
Desc: image001.png
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 6347 bytes
Desc: image002.png
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 843 bytes
Desc: image003.png
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 1174 bytes
Desc: image004.png
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 1180 bytes
Desc: image005.png
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 1249 bytes
Desc: image006.png
URL: