All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Frank Heimbächer" <frank.heimbaecher@jambit.com>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] How to use sbc.c ?
Date: Tue, 19 Dec 2006 12:43:13 +0100	[thread overview]
Message-ID: <4587D051.8080703@jambit.com> (raw)
In-Reply-To: <4583A020.2040808@xmission.com>

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

Brad Midgley schrieb:
> Frank
> 
> fyi, I moved the reply to bluez-devel.
> 
>> 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.
> 
>> 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?
> 
> The swapping was to accommodate bugs in the audio driver's endian
> processing on gumstix. You can ignore it.
> 
>> 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.
> 
>> 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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2006-12-19 11:43 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     ` Frank Heimbächer [this message]
2006-12-19 22:17       ` [Bluez-devel] How to use sbc.c ? 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       ` [Bluez-devel] " Frank Heimbaecher

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=4587D051.8080703@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.