Play received A2DP data
Dear community
I have a bit of experience with Bluetooth, but almost none with Audio streaming. Maybe somebody could give me some useful hints, URLs or HowTos to help me to get on.
My programming task: Receive audio stream from A2DP, decode it and play it. Reception of A2DP stream is ok for me, decoding should work with sbc, but there is still the problem how to get the data to the sound card. So far I thought I need a sound driver for A2DP, as a kernel module and call open, ioctl and write via snd_hwdep routines. Is that right?
Thanks for help
Frank
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Hi Frank,
Quoted 6 lines
My programming task: Receive audio stream from A2DP, decode it and play it. Reception of A2DP stream is ok for me, decoding should work with sbc, but there is still the problem how to get the data to the sound card. So far I thought I need a sound driver for A2DP, as a kernel module and call open, ioctl and write via
snd_hwdeproutines. Is that right?
maybe http://bluetooth-alsa.sourceforge.net/ is that what are you looking for?
Manuel
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Guys
Quoted 5 lines
Quoted 2 lines
My programming task: Receive audio stream from A2DP, decode it and play it.
maybe http://bluetooth-alsa.sourceforge.net/ is that what are you looking for?
right... see the a2recv app in btsco
brad
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
[Bluez-users] How to use sbc.c of btsco?
In reply to Frank HeimbaecherDear community
I want to use the codec implemented in sbc.c in btsco. Is there a chance to get a documentation of the code? I understand so much that you call sbc_init() first, sbc_finish() at the end, and use sbc_decode() and sbc_encode() for converting.
sbc_encode: It seems like you put pcm data on 'data' and get sbc data in
'sbc.data'. 'count' is not used in the function. How often must I call
it? How do I know how much of 'data' is converted already?
sbc_decode: Put sbc data on 'data' and you get pcm data in 'sbc.m.data'. Is that right? Must I always change the byte order like it is done in a2recv.c?
Are there special things to do if I have a .wav file or do I just have to call the functions? I am just talking of the payload and not the headers.
It would help me a lot if somebody could put me on the right track.
Thanks a lot
Frank
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Re: [Bluez-devel] [Bluez-users] How to use sbc.c of btsco?
Frank
fyi, I moved the reply to bluez-devel.
Quoted 3 lines
sbc_encode: It seems like you put pcm data on 'data' and get sbc data in
'sbc.data'. 'count' is not used in the function. How often must I call
it? How do I know how much of 'data' is converted already?
the return value from sbc_encode is the number of bytes consumed. It's true that count is not used properly. In fact we assume there is enough data there to fill one sbc frame.
Quoted 3 lines
sbc_decode: Put sbc data on 'data' and you get pcm data in 'sbc.m.data'. Is that right? Must I always change the byte order like it is done ina2recv.c?
The swapping was to accommodate bugs in the audio driver's endian processing on gumstix. You can ignore it.
Quoted 2 lines
Are there special things to do if I have a .wav file or do I just have to call the functions? I am just talking of the payload and not the headers.
be sure you init the encoder with the correct channels (1 or 2) and sample rate. after that just be sure to pass enough data to sbc_encode in each pass so it doesn't underrun.
Quoted 1 line
It would help me a lot if somebody could put me on the right track.
Be sure you are using the separate sbc sourceforge project since that's the version of the codec we are maintaining. Finally, we'd appreciate any patches you come up with to improve the code documentation or even more if you address any of the limitations. Documentation of course is a problem, but there's also a todo list at the top of sbc.c.
Brad
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
[Bluez-devel] How to use sbc.c ?
Thanks a lot, Brad.
What succeeded: With an older version of sbc.c I managed to encode a wav file, send it over the air and receive it, decode it and write it in a file. Well, it looks different than the original. In the original there is some information in the first bytes like: "WAVEfmt", a long area with zero bytes, then the characters "data" and then the data seems to begin. I do not find this in my received file. Is there something else I have to care about? Should I run sbcinfo and change sbc_init() according to the results?
The newest download of sbc.c from http://sbc.cvs.sourceforge.net/sbc/
under menu "CVS Browse" contains a simple bug, which lets the file compile, but crash on runtime: In function _sbc_analyze_eight() the array 't[8]' is referenced from t[1] to t[8], instead of t[0] to t[7].
Thanks a lot
Frank
Quoted 29 lines · Brad Midgley
Frank
fyi, I moved the reply to bluez-devel.
Quoted 3 lines
sbc_encode: It seems like you put pcm data on 'data' and get sbc data in
'sbc.data'. 'count' is not used in the function. How often must I call
it? How do I know how much of 'data' is converted already?the return value from
sbc_encodeis the number of bytes consumed. It's true that count is not used properly. In fact we assume there is enough data there to fill one sbc frame.Quoted 3 lines
sbc_decode: Put sbc data on 'data' and you get pcm data in 'sbc.m.data'. Is that right? Must I always change the byte order like it is done ina2recv.c?The swapping was to accommodate bugs in the audio driver's endian processing on gumstix. You can ignore it.
Quoted 3 lines
Are there special things to do if I have a .wav file or do I just have to call the functions? I am just talking of the payload and not the headers.
be sure you init the encoder with the correct channels (1 or 2) and sample rate. after that just be sure to pass enough data to
sbc_encodein each pass so it doesn't underrun.Quoted 1 line
It would help me a lot if somebody could put me on the right track.
Quoted 7 lines
Be sure you are using the separate sbc sourceforge project since that's the version of the codec we are maintaining. Finally, we'd appreciate any patches you come up with to improve the code documentation or even more if you address any of the limitations. Documentation of course is a problem, but there's also a todo list at the top of
sbc.c.Brad
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Re: [Bluez-devel] How to use sbc.c ?
Frank
Quoted 8 lines
What succeeded: With an older version of
sbc.cI managed to encode a wav file, send it over the air and receive it, decode it and write it in a file. Well, it looks different than the original. In the original there is some information in the first bytes like: "WAVEfmt", a long area with zero bytes, then the characters "data" and then the data seems to begin. I do not find this in my received file. Is there something else I have to care about? Should I run sbcinfo and changesbc_init()according to the results?
there is not a way to send metadata about the original wav over the a2dp stream. It sounds like you want a way to create a wav from the pcm received on the other side. You will have to use a conversion utility.
Quoted 4 lines
The newest download of
sbc.cfrom http://sbc.cvs.sourceforge.net/sbc/
under menu "CVS Browse" contains a simple bug, which lets the file compile, but crash on runtime: In function_sbc_analyze_eight()the array 't[8]' is referenced from t[1] to t[8], instead of t[0] to t[7].
fixed. thanks.
Brad
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Re: [Bluez-devel] How to use sbc.c ?
Brad,
Quoted 9 lines
Quoted 6 lines
The newest download of
sbc.cfrom http://sbc.cvs.sourceforge.net/sbc/
under menu "CVS Browse" contains a simple bug, which lets the file compile, but crash on runtime: In function_sbc_analyze_eight()the array 't[8]' is referenced from t[1] to t[8], instead of t[0] to t[7].fixed. thanks.
some values were missed so the sound is now larsenized ;) patch attached.
BTW, I was looking for the tables specially Proto_4_40 and Proto_8_80 from a2dp specifications. I suspect they are stored in sbc_proto_8_80m0 and sbc_proto_8_80m1.
The values are not the same that in the spec. Do you know why?
Signature · 3 lines
Frederic Without the wind, the grass does not move.
? Doxyfile
? Makefile
? Makefile.in
? aclocal.m4
? autom4te.cache
? config.guess
? config.h
? config.h.in
? config.log
? config.status
? config.sub
? configure
? debug
? depcomp
? install-sh
? libtool
? ltmain.sh
? missing
? sbc.kdevelop
? sbc.kdevelop.pcs
? sbc.kdevses
? sbc.pc
? stamp-h1
? include/Makefile
? include/Makefile.in
? lib/.deps
? lib/.libs
? lib/Makefile
? lib/Makefile.in
? lib/libsbc.la
? lib/sbc.lo
? src/.deps
? src/.libs
? src/Makefile
? src/Makefile.in
? src/sbcinfo
Index: lib/sbc.c
===================================================================
RCS file: /cvsroot/sbc/sbc/lib/sbc.c,v
retrieving revision 1.8
sbc.c +64 -64
@@ -892,84 +892,84 @@MULA (res, -_sbc_proto_8[21 ], in[75 ]); t[7 ] =SCALE8_STAGE1 (res); -MUL (res, _anamatrix8[0 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, _anamatrix8[2 ], t[3 ]); -MULA (res, _anamatrix8[3 ], t[4 ]); -MULA (res, _anamatrix8[6 ], t[5 ]); -MULA (res, _anamatrix8[4 ], t[6 ]); -MULA (res, _anamatrix8[1 ], t[7 ]); -MULA (res, _anamatrix8[5 ], t[8 ]); +MUL (res, _anamatrix8[0 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, _anamatrix8[2 ], t[2 ]); +MULA (res, _anamatrix8[3 ], t[3 ]); +MULA (res, _anamatrix8[6 ], t[4 ]); +MULA (res, _anamatrix8[4 ], t[5 ]); +MULA (res, _anamatrix8[1 ], t[6 ]); +MULA (res, _anamatrix8[5 ], t[7 ]); out[0 ] =SCALE8_STAGE2 (res); -MUL (res, _anamatrix8[1 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, _anamatrix8[3 ], t[3 ]); -MULA (res, -_anamatrix8[5 ], t[4 ]); -MULA (res, -_anamatrix8[6 ], t[5 ]); -MULA (res, -_anamatrix8[2 ], t[6 ]); -MULA (res, -_anamatrix8[0 ], t[7 ]); -MULA (res, -_anamatrix8[4 ], t[8 ]); +MUL (res, _anamatrix8[1 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, _anamatrix8[3 ], t[2 ]); +MULA (res, -_anamatrix8[5 ], t[3 ]); +MULA (res, -_anamatrix8[6 ], t[4 ]); +MULA (res, -_anamatrix8[2 ], t[5 ]); +MULA (res, -_anamatrix8[0 ], t[6 ]); +MULA (res, -_anamatrix8[4 ], t[7 ]); out[1 ] =SCALE8_STAGE2 (res); -MUL (res, -_anamatrix8[1 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, _anamatrix8[4 ], t[3 ]); -MULA (res, -_anamatrix8[2 ], t[4 ]); -MULA (res, -_anamatrix8[6 ], t[5 ]); -MULA (res, _anamatrix8[5 ], t[6 ]); -MULA (res, _anamatrix8[0 ], t[7 ]); -MULA (res, _anamatrix8[3 ], t[8 ]); +MUL (res, -_anamatrix8[1 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, _anamatrix8[4 ], t[2 ]); +MULA (res, -_anamatrix8[2 ], t[3 ]); +MULA (res, -_anamatrix8[6 ], t[4 ]); +MULA (res, _anamatrix8[5 ], t[5 ]); +MULA (res, _anamatrix8[0 ], t[6 ]); +MULA (res, _anamatrix8[3 ], t[7 ]); out[2 ] =SCALE8_STAGE2 (res); -MUL (res, -_anamatrix8[0 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, _anamatrix8[5 ], t[3 ]); -MULA (res, -_anamatrix8[4 ], t[4 ]); -MULA (res, _anamatrix8[6 ], t[5 ]); -MULA (res, _anamatrix8[3 ], t[6 ]); -MULA (res, -_anamatrix8[1 ], t[7 ]); -MULA (res, -_anamatrix8[2 ], t[8 ]); +MUL (res, -_anamatrix8[0 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, _anamatrix8[5 ], t[2 ]); +MULA (res, -_anamatrix8[4 ], t[3 ]); +MULA (res, _anamatrix8[6 ], t[4 ]); +MULA (res, _anamatrix8[3 ], t[5 ]); +MULA (res, -_anamatrix8[1 ], t[6 ]); +MULA (res, -_anamatrix8[2 ], t[7 ]); out[3 ] =SCALE8_STAGE2 (res); -MUL (res, -_anamatrix8[0 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, -_anamatrix8[5 ], t[3 ]); -MULA (res, _anamatrix8[4 ], t[4 ]); -MULA (res, _anamatrix8[6 ], t[5 ]); -MULA (res, -_anamatrix8[3 ], t[6 ]); -MULA (res, -_anamatrix8[1 ], t[7 ]); -MULA (res, _anamatrix8[2 ], t[8 ]); +MUL (res, -_anamatrix8[0 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, -_anamatrix8[5 ], t[2 ]); +MULA (res, _anamatrix8[4 ], t[3 ]); +MULA (res, _anamatrix8[6 ], t[4 ]); +MULA (res, -_anamatrix8[3 ], t[5 ]); +MULA (res, -_anamatrix8[1 ], t[6 ]); +MULA (res, _anamatrix8[2 ], t[7 ]); out[4 ] =SCALE8_STAGE2 (res); -MUL (res, -_anamatrix8[1 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, -_anamatrix8[4 ], t[3 ]); -MULA (res, _anamatrix8[2 ], t[4 ]); -MULA (res, -_anamatrix8[6 ], t[5 ]); -MULA (res, -_anamatrix8[5 ], t[6 ]); -MULA (res, _anamatrix8[0 ], t[7 ]); -MULA (res, -_anamatrix8[3 ], t[8 ]); +MUL (res, -_anamatrix8[1 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, -_anamatrix8[4 ], t[2 ]); +MULA (res, _anamatrix8[2 ], t[3 ]); +MULA (res, -_anamatrix8[6 ], t[4 ]); +MULA (res, -_anamatrix8[5 ], t[5 ]); +MULA (res, _anamatrix8[0 ], t[6 ]); +MULA (res, -_anamatrix8[3 ], t[7 ]); out[5 ] =SCALE8_STAGE2 (res); -MUL (res, _anamatrix8[1 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, -_anamatrix8[3 ], t[3 ]); -MULA (res, _anamatrix8[5 ], t[4 ]); -MULA (res, -_anamatrix8[6 ], t[5 ]); -MULA (res, _anamatrix8[2 ], t[6 ]); -MULA (res, -_anamatrix8[0 ], t[7 ]); -MULA (res, _anamatrix8[4 ], t[8 ]); +MUL (res, _anamatrix8[1 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, -_anamatrix8[3 ], t[2 ]); +MULA (res, _anamatrix8[5 ], t[3 ]); +MULA (res, -_anamatrix8[6 ], t[4 ]); +MULA (res, _anamatrix8[2 ], t[5 ]); +MULA (res, -_anamatrix8[0 ], t[6 ]); +MULA (res, _anamatrix8[4 ], t[7 ]); out[6 ] =SCALE8_STAGE2 (res); -MUL (res, _anamatrix8[0 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, -_anamatrix8[2 ], t[3 ]); -MULA (res, -_anamatrix8[3 ], t[4 ]); -MULA (res, _anamatrix8[6 ], t[5 ]); -MULA (res, -_anamatrix8[4 ], t[6 ]); -MULA (res, _anamatrix8[1 ], t[7 ]); -MULA (res, -_anamatrix8[5 ], t[8 ]); +MUL (res, _anamatrix8[0 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, -_anamatrix8[2 ], t[2 ]); +MULA (res, -_anamatrix8[3 ], t[3 ]); +MULA (res, _anamatrix8[6 ], t[4 ]); +MULA (res, -_anamatrix8[4 ], t[5 ]); +MULA (res, _anamatrix8[1 ], t[6 ]); +MULA (res, -_anamatrix8[5 ], t[7 ]); out[7 ] =SCALE8_STAGE2 (res); }
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Re: [Bluez-devel] How to use sbc.c ?
Fr=E9d=E9ric
Somehow this message went to my junk folder!
The tables we have are different because we have changed the algorithm over time and adapted the tables to avoid some computation. We also split the tables as a result of how they are used.
On top of that, we converted the values to integers which doesn't help make it easy to follow.
I hope it's not impossible to follow :(
Brad
Quoted 55 lines
Quoted 9 lines
Quoted 5 lines
The newest download of
sbc.cfrom http://sbc.cvs.sourceforge.net/sbc/
under menu "CVS Browse" contains a simple bug, which lets the file compile, but crash on runtime: In function_sbc_analyze_eight()the array 't[8]' is referenced from t[1] to t[8], instead of t[0] to t[7].=fixed. thanks.
=some values were missed so the sound is now larsenized ;) patch attached.
=BTW, I was looking for the tables specially
Proto_4_40andProto_8_80from a2dp specifications.
I suspect they are stored insbc_proto_8_80m0andsbc_proto_8_80m1. The values are not the same that in the spec. Do you know why? ==
------------------------------------------------------------------------
=? Doxyfile
?Makefile
? Makefile.in
? aclocal.m4
? autom4te.cache
? config.guess
?config.h
? config.h.in
? config.log
? config.status
? config.sub
? configure
? debug
? depcomp
? install-sh
? libtool
?ltmain.sh
? missing
? sbc.kdevelop
? sbc.kdevelop.pcs
? sbc.kdevses
? sbc.pc
? stamp-h1
?include/Makefile
?include/Makefile.in
?lib/.deps
?lib/.libs
? lib/Makefile
?lib/Makefile.in
?lib/libsbc.la
Quoted 8 lines
?
lib/sbc.lo
? src/.deps
? src/.libs
? src/Makefile
? src/Makefile.in
? src/sbcinfo
Index:lib/sbc.c=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Quoted 165 lines
RCS file: /cvsroot/sbc/sbc/lib/sbc.c,v
retrieving revision 1.8
diff -u -r1.8sbc.csbc.c +64
-64@@ -892,84 +892,84 @@MULA (res, -_sbc_proto_8[21 ], in[75 ]); t[7] =3D SCALE8_STAGE1(res); = -MUL (res, _anamatrix8[0 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, _anamatrix8[2 ], t[3 ]); -MULA (res, _anamatrix8[3 ], t[4 ]); -MULA (res, _anamatrix8[6 ], t[5 ]); -MULA (res, _anamatrix8[4 ], t[6 ]); -MULA (res, _anamatrix8[1 ], t[7 ]); -MULA (res, _anamatrix8[5 ], t[8 ]); +MUL (res, _anamatrix8[0 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, _anamatrix8[2 ], t[2 ]); +MULA (res, _anamatrix8[3 ], t[3 ]); +MULA (res, _anamatrix8[6 ], t[4 ]); +MULA (res, _anamatrix8[4 ], t[5 ]); +MULA (res, _anamatrix8[1 ], t[6 ]); +MULA (res, _anamatrix8[5 ], t[7 ]); out[0] =3D SCALE8_STAGE2(res); = -MUL (res, _anamatrix8[1 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, _anamatrix8[3 ], t[3 ]); -MULA (res, -_anamatrix8[5 ], t[4 ]); -MULA (res, -_anamatrix8[6 ], t[5 ]); -MULA (res, -_anamatrix8[2 ], t[6 ]); -MULA (res, -_anamatrix8[0 ], t[7 ]); -MULA (res, -_anamatrix8[4 ], t[8 ]); +MUL (res, _anamatrix8[1 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, _anamatrix8[3 ], t[2 ]); +MULA (res, -_anamatrix8[5 ], t[3 ]); +MULA (res, -_anamatrix8[6 ], t[4 ]); +MULA (res, -_anamatrix8[2 ], t[5 ]); +MULA (res, -_anamatrix8[0 ], t[6 ]); +MULA (res, -_anamatrix8[4 ], t[7 ]); out[1] =3D SCALE8_STAGE2(res); = -MUL (res, -_anamatrix8[1 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, _anamatrix8[4 ], t[3 ]); -MULA (res, -_anamatrix8[2 ], t[4 ]); -MULA (res, -_anamatrix8[6 ], t[5 ]); -MULA (res, _anamatrix8[5 ], t[6 ]); -MULA (res, _anamatrix8[0 ], t[7 ]); -MULA (res, _anamatrix8[3 ], t[8 ]); +MUL (res, -_anamatrix8[1 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, _anamatrix8[4 ], t[2 ]); +MULA (res, -_anamatrix8[2 ], t[3 ]); +MULA (res, -_anamatrix8[6 ], t[4 ]); +MULA (res, _anamatrix8[5 ], t[5 ]); +MULA (res, _anamatrix8[0 ], t[6 ]); +MULA (res, _anamatrix8[3 ], t[7 ]); out[2] =3D SCALE8_STAGE2(res); = -MUL (res, -_anamatrix8[0 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, _anamatrix8[5 ], t[3 ]); -MULA (res, -_anamatrix8[4 ], t[4 ]); -MULA (res, _anamatrix8[6 ], t[5 ]); -MULA (res, _anamatrix8[3 ], t[6 ]); -MULA (res, -_anamatrix8[1 ], t[7 ]); -MULA (res, -_anamatrix8[2 ], t[8 ]); +MUL (res, -_anamatrix8[0 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, _anamatrix8[5 ], t[2 ]); +MULA (res, -_anamatrix8[4 ], t[3 ]); +MULA (res, _anamatrix8[6 ], t[4 ]); +MULA (res, _anamatrix8[3 ], t[5 ]); +MULA (res, -_anamatrix8[1 ], t[6 ]); +MULA (res, -_anamatrix8[2 ], t[7 ]); out[3] =3D SCALE8_STAGE2(res); = -MUL (res, -_anamatrix8[0 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, -_anamatrix8[5 ], t[3 ]); -MULA (res, _anamatrix8[4 ], t[4 ]); -MULA (res, _anamatrix8[6 ], t[5 ]); -MULA (res, -_anamatrix8[3 ], t[6 ]); -MULA (res, -_anamatrix8[1 ], t[7 ]); -MULA (res, _anamatrix8[2 ], t[8 ]); +MUL (res, -_anamatrix8[0 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, -_anamatrix8[5 ], t[2 ]); +MULA (res, _anamatrix8[4 ], t[3 ]); +MULA (res, _anamatrix8[6 ], t[4 ]); +MULA (res, -_anamatrix8[3 ], t[5 ]); +MULA (res, -_anamatrix8[1 ], t[6 ]); +MULA (res, _anamatrix8[2 ], t[7 ]); out[4] =3D SCALE8_STAGE2(res); = -MUL (res, -_anamatrix8[1 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, -_anamatrix8[4 ], t[3 ]); -MULA (res, _anamatrix8[2 ], t[4 ]); -MULA (res, -_anamatrix8[6 ], t[5 ]); -MULA (res, -_anamatrix8[5 ], t[6 ]); -MULA (res, _anamatrix8[0 ], t[7 ]); -MULA (res, -_anamatrix8[3 ], t[8 ]); +MUL (res, -_anamatrix8[1 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, -_anamatrix8[4 ], t[2 ]); +MULA (res, _anamatrix8[2 ], t[3 ]); +MULA (res, -_anamatrix8[6 ], t[4 ]); +MULA (res, -_anamatrix8[5 ], t[5 ]); +MULA (res, _anamatrix8[0 ], t[6 ]); +MULA (res, -_anamatrix8[3 ], t[7 ]); out[5] =3D SCALE8_STAGE2(res); = -MUL (res, _anamatrix8[1 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, -_anamatrix8[3 ], t[3 ]); -MULA (res, _anamatrix8[5 ], t[4 ]); -MULA (res, -_anamatrix8[6 ], t[5 ]); -MULA (res, _anamatrix8[2 ], t[6 ]); -MULA (res, -_anamatrix8[0 ], t[7 ]); -MULA (res, _anamatrix8[4 ], t[8 ]); +MUL (res, _anamatrix8[1 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, -_anamatrix8[3 ], t[2 ]); +MULA (res, _anamatrix8[5 ], t[3 ]); +MULA (res, -_anamatrix8[6 ], t[4 ]); +MULA (res, _anamatrix8[2 ], t[5 ]); +MULA (res, -_anamatrix8[0 ], t[6 ]); +MULA (res, _anamatrix8[4 ], t[7 ]); out[6] =3D SCALE8_STAGE2(res); = -MUL (res, _anamatrix8[0 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, -_anamatrix8[2 ], t[3 ]); -MULA (res, -_anamatrix8[3 ], t[4 ]); -MULA (res, _anamatrix8[6 ], t[5 ]); -MULA (res, -_anamatrix8[4 ], t[6 ]); -MULA (res, _anamatrix8[1 ], t[7 ]); -MULA (res, -_anamatrix8[5 ], t[8 ]); +MUL (res, _anamatrix8[0 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, -_anamatrix8[2 ], t[2 ]); +MULA (res, -_anamatrix8[3 ], t[3 ]); +MULA (res, _anamatrix8[6 ], t[4 ]); +MULA (res, -_anamatrix8[4 ], t[5 ]); +MULA (res, _anamatrix8[1 ], t[6 ]); +MULA (res, -_anamatrix8[5 ], t[7 ]); out[7] =3D SCALE8_STAGE2(res); } ==
Quoted 8 lines
=
------------------------------------------------------------------------
=-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share y=
our
Quoted 2 lines
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
Quoted 11 lines
=
=
------------------------------------------------------------------------
=_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Re: [Bluez-devel] How to use sbc.c ?
Hello Brad,
Quoted 8 lines · Brad Midgley
The tables we have are different because we have changed the algorithm over time and adapted the tables to avoid some computation. We also split the tables as a result of how they are used.
On top of that, we converted the values to integers which doesn't help make it easy to follow.
I hope it's not impossible to follow :(
At least it's difficult. ;-)
Maybe a short comment line would be nice which describes the steps from the original tables to the ones found in the code. The perfect solution would be the original matrix in the code and some pre-processor magic to calculate the derived ones during compile time. If you describe the necessary steps I could have a look at it, because I need to optimize the synthesize methods for our project on a fixed-point DSP anyways.
Best regards
Siegbert
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Re: [Bluez-devel] How to use sbc.c ?
Siegbert
Quoted 7 lines
At least it's difficult. ;-)
Maybe a short comment line would be nice which describes the steps from the original tables to the ones found in the code. The perfect solution would be the original matrix in the code and some pre-processor magic to calculate the derived ones during compile time. If you describe the necessary steps I could have a look at it, because I need to optimize the synthesize methods for our project on a fixed-point DSP anyways.
I've been trying to fix some problems in there and I will reconstruct as much as I can from memory and comment it.
Brad
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Re: [Bluez-devel] How to use sbc.c ?
In reply to Brad MidgleyBrad,
Thank you for answering, I was hesitating between precalculation or =
custom tables.
I've not been really deep into the codec now. It's not easy to follow as =
the spec itself could be more clear.
In my investigations, I got over a 64 bits version of the codec. I =
tested it on pc and arm. It gave better results than the 32 bits : the =
gain is better, the overflow do not occurs, there is still a bit of =
background noise, but not more than the 32 bits and it may be the sample =
file. It will probably consume a little bit more cpu, but I found this =
was not really noticeable (at least on my hardware). But the library =
could be changed according to needs.
While this is not the best solution to the problem, I still think users =
are complaining mainly about gain. So it could be possible to provide it =
as default. What about you?
Regards,
Fr=E9d=E9ric.
Brad Midgley a =E9crit :
Quoted 8 lines
Fr=E9d=E9ric
Somehow this message went to my junk folder!
The tables we have are different because we have changed the algorithm over time and adapted the tables to avoid some computation. We also split the tables as a result of how they are used.
Quoted 71 lines
On top of that, we converted the values to integers which doesn't help make it easy to follow.
I hope it's not impossible to follow :(
Brad
=
Quoted 62 lines
Quoted 6 lines
Quoted 5 lines
The newest download of
sbc.cfrom http://sbc.cvs.sourceforge.net/sbc/
under menu "CVS Browse" contains a simple bug, which lets the file compile, but crash on runtime: In function_sbc_analyze_eight()the array 't[8]' is referenced from t[1] to t[8], instead of t[0] to t[7].=Quoted 6 lines
Quoted 1 line
=fixed. thanks.
==some values were missed so the sound is now larsenized ;) patch attached.
BTW, I was looking for the tables specially
Proto_4_40andProto_8_80from a2dp specifications.
I suspect they are stored insbc_proto_8_80m0andsbc_proto_8_80m1. The values are not the same that in the spec. Do you know why?------------------------------------------------------------------------
? Doxyfile
?Makefile
? Makefile.in
? aclocal.m4
? autom4te.cache
? config.guess
?config.h
? config.h.in
? config.log
? config.status
? config.sub
? configure
? debug
? depcomp
? install-sh
? libtool
?ltmain.sh
? missing
? sbc.kdevelop
? sbc.kdevelop.pcs
? sbc.kdevses
? sbc.pc
? stamp-h1
?include/Makefile
?include/Makefile.in
?lib/.deps
?lib/.libs
? lib/Makefile
?lib/Makefile.in
?lib/libsbc.la
?lib/sbc.lo
? src/.deps
? src/.libs
? src/Makefile
? src/Makefile.in
? src/sbcinfo
Index:lib/sbc.c=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Quoted 165 lines
Quoted 165 lines
RCS file: /cvsroot/sbc/sbc/lib/sbc.c,v
retrieving revision 1.8
diff -u -r1.8sbc.csbc.c +64
-64@@ -892,84 +892,84 @@MULA (res, -_sbc_proto_8[21 ], in[75 ]); t[7] =3D SCALE8_STAGE1(res); = -MUL (res, _anamatrix8[0 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, _anamatrix8[2 ], t[3 ]); -MULA (res, _anamatrix8[3 ], t[4 ]); -MULA (res, _anamatrix8[6 ], t[5 ]); -MULA (res, _anamatrix8[4 ], t[6 ]); -MULA (res, _anamatrix8[1 ], t[7 ]); -MULA (res, _anamatrix8[5 ], t[8 ]); +MUL (res, _anamatrix8[0 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, _anamatrix8[2 ], t[2 ]); +MULA (res, _anamatrix8[3 ], t[3 ]); +MULA (res, _anamatrix8[6 ], t[4 ]); +MULA (res, _anamatrix8[4 ], t[5 ]); +MULA (res, _anamatrix8[1 ], t[6 ]); +MULA (res, _anamatrix8[5 ], t[7 ]); out[0] =3D SCALE8_STAGE2(res); = -MUL (res, _anamatrix8[1 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, _anamatrix8[3 ], t[3 ]); -MULA (res, -_anamatrix8[5 ], t[4 ]); -MULA (res, -_anamatrix8[6 ], t[5 ]); -MULA (res, -_anamatrix8[2 ], t[6 ]); -MULA (res, -_anamatrix8[0 ], t[7 ]); -MULA (res, -_anamatrix8[4 ], t[8 ]); +MUL (res, _anamatrix8[1 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, _anamatrix8[3 ], t[2 ]); +MULA (res, -_anamatrix8[5 ], t[3 ]); +MULA (res, -_anamatrix8[6 ], t[4 ]); +MULA (res, -_anamatrix8[2 ], t[5 ]); +MULA (res, -_anamatrix8[0 ], t[6 ]); +MULA (res, -_anamatrix8[4 ], t[7 ]); out[1] =3D SCALE8_STAGE2(res); = -MUL (res, -_anamatrix8[1 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, _anamatrix8[4 ], t[3 ]); -MULA (res, -_anamatrix8[2 ], t[4 ]); -MULA (res, -_anamatrix8[6 ], t[5 ]); -MULA (res, _anamatrix8[5 ], t[6 ]); -MULA (res, _anamatrix8[0 ], t[7 ]); -MULA (res, _anamatrix8[3 ], t[8 ]); +MUL (res, -_anamatrix8[1 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, _anamatrix8[4 ], t[2 ]); +MULA (res, -_anamatrix8[2 ], t[3 ]); +MULA (res, -_anamatrix8[6 ], t[4 ]); +MULA (res, _anamatrix8[5 ], t[5 ]); +MULA (res, _anamatrix8[0 ], t[6 ]); +MULA (res, _anamatrix8[3 ], t[7 ]); out[2] =3D SCALE8_STAGE2(res); = -MUL (res, -_anamatrix8[0 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, _anamatrix8[5 ], t[3 ]); -MULA (res, -_anamatrix8[4 ], t[4 ]); -MULA (res, _anamatrix8[6 ], t[5 ]); -MULA (res, _anamatrix8[3 ], t[6 ]); -MULA (res, -_anamatrix8[1 ], t[7 ]); -MULA (res, -_anamatrix8[2 ], t[8 ]); +MUL (res, -_anamatrix8[0 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, _anamatrix8[5 ], t[2 ]); +MULA (res, -_anamatrix8[4 ], t[3 ]); +MULA (res, _anamatrix8[6 ], t[4 ]); +MULA (res, _anamatrix8[3 ], t[5 ]); +MULA (res, -_anamatrix8[1 ], t[6 ]); +MULA (res, -_anamatrix8[2 ], t[7 ]); out[3] =3D SCALE8_STAGE2(res); = -MUL (res, -_anamatrix8[0 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, -_anamatrix8[5 ], t[3 ]); -MULA (res, _anamatrix8[4 ], t[4 ]); -MULA (res, _anamatrix8[6 ], t[5 ]); -MULA (res, -_anamatrix8[3 ], t[6 ]); -MULA (res, -_anamatrix8[1 ], t[7 ]); -MULA (res, _anamatrix8[2 ], t[8 ]); +MUL (res, -_anamatrix8[0 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, -_anamatrix8[5 ], t[2 ]); +MULA (res, _anamatrix8[4 ], t[3 ]); +MULA (res, _anamatrix8[6 ], t[4 ]); +MULA (res, -_anamatrix8[3 ], t[5 ]); +MULA (res, -_anamatrix8[1 ], t[6 ]); +MULA (res, _anamatrix8[2 ], t[7 ]); out[4] =3D SCALE8_STAGE2(res); = -MUL (res, -_anamatrix8[1 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, -_anamatrix8[4 ], t[3 ]); -MULA (res, _anamatrix8[2 ], t[4 ]); -MULA (res, -_anamatrix8[6 ], t[5 ]); -MULA (res, -_anamatrix8[5 ], t[6 ]); -MULA (res, _anamatrix8[0 ], t[7 ]); -MULA (res, -_anamatrix8[3 ], t[8 ]); +MUL (res, -_anamatrix8[1 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, -_anamatrix8[4 ], t[2 ]); +MULA (res, _anamatrix8[2 ], t[3 ]); +MULA (res, -_anamatrix8[6 ], t[4 ]); +MULA (res, -_anamatrix8[5 ], t[5 ]); +MULA (res, _anamatrix8[0 ], t[6 ]); +MULA (res, -_anamatrix8[3 ], t[7 ]); out[5] =3D SCALE8_STAGE2(res); = -MUL (res, _anamatrix8[1 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, -_anamatrix8[3 ], t[3 ]); -MULA (res, _anamatrix8[5 ], t[4 ]); -MULA (res, -_anamatrix8[6 ], t[5 ]); -MULA (res, _anamatrix8[2 ], t[6 ]); -MULA (res, -_anamatrix8[0 ], t[7 ]); -MULA (res, _anamatrix8[4 ], t[8 ]); +MUL (res, _anamatrix8[1 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, -_anamatrix8[3 ], t[2 ]); +MULA (res, _anamatrix8[5 ], t[3 ]); +MULA (res, -_anamatrix8[6 ], t[4 ]); +MULA (res, _anamatrix8[2 ], t[5 ]); +MULA (res, -_anamatrix8[0 ], t[6 ]); +MULA (res, _anamatrix8[4 ], t[7 ]); out[6] =3D SCALE8_STAGE2(res); = -MUL (res, _anamatrix8[0 ], t[1 ]); -MULA (res, _anamatrix8[7 ], t[2 ]); -MULA (res, -_anamatrix8[2 ], t[3 ]); -MULA (res, -_anamatrix8[3 ], t[4 ]); -MULA (res, _anamatrix8[6 ], t[5 ]); -MULA (res, -_anamatrix8[4 ], t[6 ]); -MULA (res, _anamatrix8[1 ], t[7 ]); -MULA (res, -_anamatrix8[5 ], t[8 ]); +MUL (res, _anamatrix8[0 ], t[0 ]); +MULA (res, _anamatrix8[7 ], t[1 ]); +MULA (res, -_anamatrix8[2 ], t[2 ]); +MULA (res, -_anamatrix8[3 ], t[3 ]); +MULA (res, _anamatrix8[6 ], t[4 ]); +MULA (res, -_anamatrix8[4 ], t[5 ]); +MULA (res, _anamatrix8[1 ], t[6 ]); +MULA (res, -_anamatrix8[5 ], t[7 ]); out[7] =3D SCALE8_STAGE2(res); } =
Quoted 5 lines
Quoted 5 lines
------------------------------------------------------------------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share =
your
Quoted 2 lines
Quoted 2 lines
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=
=3DDEVDEV
Quoted 12 lines
Quoted 9 lines
------------------------------------------------------------------------
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel=
Quoted 3 lines
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share y=
our
Quoted 2 lines
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
Quoted 5 lines
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
=
-- =
Frederic
Without the wind, the grass does not move.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Re: [Bluez-devel] How to use sbc.c ?
Fr=E9d=E9ric
Quoted 12 lines
In my investigations, I got over a 64 bits version of the codec. I =
tested it on pc and arm. It gave better results than the 32 bits : the =
gain is better, the overflow do not occurs, there is still a bit of =
background noise, but not more than the 32 bits and it may be the sample =
file. It will probably consume a little bit more cpu, but I found this =
was not really noticeable (at least on my hardware). But the library =
Quoted 8 lines
could be changed according to needs.
=While this is not the best solution to the problem, I still think users =
are complaining mainly about gain. So it could be possible to provide it =
as default. What about you?
We have confirmation that this stuff can be done in 32 bits but it is more work to get it right. I thought I was getting close back when I was working on it last but couldn't get over those volume/overflow problems. I do think the decoder was working ok in 32 bits at least.
We used to run everything in 64 bits. btsco/sbc would have the cvs history showing the older stuff.
How about if we create a separate cvs module like "sbc64" that contains libsbc with a 64-bit encoder? I don't like having the implementations together with a bunch of conditional code choosing one over the other. That was really ugly and too easy to break.
Brad
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
[Bluez-devel] RE : How to use sbc.c ?
Brad
Quoted 2 lines
How about if we create a separate cvs module like "sbc64" that contains libsbc with a 64-bit encoder?
I fully agree!
Should the two library coexist?
Frédéric
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Re: [Bluez-devel] RE : How to use sbc.c ?
Frederic
I don't think they should need to coexist. We'll choose one or the other and it'll create the same shared objects. They do need to stay binary/api compatible to pull that off though.
Quoted 5 lines
Quoted 2 lines
How about if we create a separate cvs module like "sbc64" that contains libsbc with a 64-bit encoder?
I fully agree!
Should the two library coexist?
Brad
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Re: [Bluez-devel] How to use sbc.c ?
In reply to Frank HeimbächerHello
I found out that sbc.c, as it is, works for big endian. On little endian machines you cannot recognize an audio file after encoding and decoding. So I changed the code a bit:
sbc_decode():
// fh 20.12.06: original source code assumes big endian // so we have to change the order of the following 2 statements *ptr++ = (s & 0x00ff);
*ptr++ = (s & 0xff00) >> 8;
sbc_encode():
// fh 20.12.06: original source code assumes big endian // so we have to exchange [0] and [1] here int16_t s = (ptr[1] & 0xff) << 8 | (ptr[0] & 0xff);
Would it be a suggestion to work with a macro LITTLE_ENDIAN here?
And very interesting for me: Are there other places in the code that need to be adapted to little endian? Because the result after decoding is still poor: volume is too low, speed is too high (probably data missing) and sound is quite shallow. When I write the resulting data to a file, it is smaller than the original.
Thanks for help
Frank
Signature · 20 lines
Dipl.-Inform. Frank Heimbaecher, Senior Software Architect jambit Software Development & Management GmbH Nymphenburger Strasse 13-15, D-80335 Muenchen http://www.jambit.com where innovation works Tel.: +49.89.45 2347-42 Fax: +49.89.45 2347-70 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Bluez-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bluez-devel