From: Frank Heimbaecher <frank.heimbaecher@jambit.com>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] How to use sbc.c ?
Date: Fri, 22 Dec 2006 13:07:41 +0100 [thread overview]
Message-ID: <458BCA8D.5030001@jambit.com> (raw)
In-Reply-To: <4587D051.8080703@jambit.com>
Hello
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
--
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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
prev parent reply other threads:[~2006-12-22 12:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-31 10:19 [Bluez-users] Play received A2DP data Frank Heimbaecher
2006-08-31 11:37 ` Manuel Bernhardt
2006-08-31 13:05 ` Brad Midgley
2006-12-15 13:28 ` [Bluez-users] How to use sbc.c of btsco? Frank Heimbächer
2006-12-16 7:28 ` [Bluez-devel] " Brad Midgley
2006-12-19 11:43 ` [Bluez-devel] How to use sbc.c ? Frank Heimbächer
2006-12-19 22:17 ` Brad Midgley
2006-12-20 13:14 ` Frédéric DALLEAU
2007-01-10 20:32 ` Brad Midgley
2007-01-11 8:24 ` Siegbert Baude
2007-01-16 4:33 ` Brad Midgley
2007-01-11 8:35 ` Frédéric DALLEAU
2007-01-12 18:52 ` Brad Midgley
2007-01-13 17:32 ` [Bluez-devel] RE : " Frederic Dalleau
2007-01-16 4:25 ` Brad Midgley
2006-12-22 12:07 ` Frank Heimbaecher [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=458BCA8D.5030001@jambit.com \
--to=frank.heimbaecher@jambit.com \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox