From: Eric Wong <normalperson@yhbt.net>
To: sox-devel@lists.sourceforge.net
Subject: Re: sox src/coreaudio device name truncation fix
Date: Wed, 15 Jun 2016 07:22:52 +0000 [thread overview]
Message-ID: <20160615072252.GA13636@dcvr.yhbt.net> (raw)
In-Reply-To: <1465929413.3110479.637612809.34A344C0@webmail.messagingengine.com>
gqrxzy8974@ftml.net wrote:
> I haven't tested this but it appears the code:
>
> https://sourceforge.net/p/sox/code/ci/master/tree/src/coreaudio.c#l154
> char name[256];
> status = AudioDeviceGetProperty(devices[i],0,false,kAudioDevicePropertyDeviceName,&property_size,&name);
>
> Needs to have
> property_size = sizeof(name);
> added before the AudioDeviceGetProperty call.
>
> Otherwise property_size has the left over length from the previous request for the list of devices. I'm seeing
> returned names truncated to 11 characters which is 12 including the \0 which matches the
> 3 device id's (at 4 bytes each) returned by the previous use of property_size.
Seems reasonable. Can you test this?
(or provide at least provide a documentation reference).
If not, is there someone else here who can?
Thanks.
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://pubads.g.doubleclick.net/gampad/clk?id=1444514421&iu=/41014381
next prev parent reply other threads:[~2016-06-15 7:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 18:36 sox src/coreaudio device name truncation fix gqrxzy8974
2016-06-15 7:22 ` Eric Wong [this message]
2016-06-15 14:09 ` gqrxzy8974
2016-06-16 2:50 ` Eric Wong
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-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.sourceforge.net/lists/listinfo/sox-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160615072252.GA13636@dcvr.yhbt.net \
--to=sox-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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/sox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).