From: Mayank Batra <mayankbatra@yahoo.co.in>
To: BLUEZ DEVELOPERS LIST <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] What endian type is supported by audio device ?
Date: Sun, 1 May 2005 13:22:09 +0100 (BST) [thread overview]
Message-ID: <20050501122209.63346.qmail@web8309.mail.in.yahoo.com> (raw)
Marcel,
Don't you think that we should first find out which
endian type the user's audio device supports ?
I mean, in the file sbc.c in the following lines
for (i = 0; i < samples; i++) {
for (ch = 0; ch < priv->frame.channels; ch++) {
int16_t s =
(int16_t)(priv->frame.pcm_sample[ch][i]);
*ptr++ = (s & 0xff00) >> 8;
*ptr++ = (s & 0x00ff);
}
}
Shouldn't we first check out whether the user's audio
device supports little endian or big endian type ?
It should be something like below...
for (i = 0; i < samples; i++) {
for (ch = 0; ch < priv->frame.channels; ch++) {
int16_t s =
(int16_t)(priv->frame.pcm_sample[ch][i]);
if(BIG_ENDIAN) {
*ptr++ = (s & 0xff00) >> 8;
*ptr++ = (s & 0x00ff);
}
else {
*ptr++ = (s & 0x00ff);
*ptr++ = (s & 0xff00) >> 8;
}
}
}
Ofcourse BIG_ENDIAN will be replaced by a function or
macro which returns the endian type.
Do you have knowledge of such a function or macro ?
If yes, please patch sbc.c file for us.
It will be great for people like me who have spent
weeks in figuring out why the sound quality is so poor
while using sbcdec.c
I use an Intel based machine, which follows
little-endian format.
But sbc.c was using big endian format.
Thanks and Regards
Mayank
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next reply other threads:[~2005-05-01 12:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-01 12:22 Mayank Batra [this message]
2005-05-01 12:49 ` [Bluez-devel] What endian type is supported by audio device ? Marcel Holtmann
-- strict thread matches above, loose matches on Subject: below --
2005-05-03 13:28 Mayank Batra
2005-05-03 15:33 ` Marcel Holtmann
2005-05-05 12:37 Mayank Batra
2005-05-05 13:05 ` Marcel Holtmann
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=20050501122209.63346.qmail@web8309.mail.in.yahoo.com \
--to=mayankbatra@yahoo.co.in \
--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