🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #356

Re: Recording 24-bit audio -- now working!

#356
From: Chris Croughton
Date: Tue, 17 Aug 2004 13:45
44 lines
2806 bytes
On Tue, 17 Aug 2004 09:00:48 +0100, Mark Jacobs 
   <mark@jacobsm.com> wrote:

> On Mon, 16 Aug 2004 19:37:34 +0100, Chris Croughton <chris@keristor.net>  
> wrote:
> 
>> I'm sure BC++ has a way to indicate that structures are packed
>> and not padded to 4-byte boundaries, but I can't find it.
> 
> It certainly has. If you look under Project, Options, Advanced Compiler,  
> Data Alignment Radiogroup, and select Word boundaries (2-byte), it should  
> work in the same way MSVC works. The Borland default is Double Word  
> alignment (4-byte).

That causes problems with Borland libraries which expect the DW
alignment, there needs to be a local switch to do it for specific
structures (#pragma pack does that, I found it eventually).  

I've found it.  Header files pshpack1.h and poppack.h have

#pragma option push -b -a8 -pc -A- /*P_O_Push*/

at the start and

#pragma option pop

at the end, so all of the manipulations of the pack option in the middle
have no effect!  The Microsoft SDK  ones don't have those lines (and are
otherwise identical).  (The same applies to pshpack{2,4,8}.h)

As I surmised, a Borland bug (although not the one I thought, the
packing options do work).

I see no way round it other than editing those files on every system (or
using my redefined structure)...

Note: this applies to BCB 6 only.  The free command-line-only BC++ 5.5
tools do not have this bug, the files are identical to the MS SDK ones
(except that the latter have a couple of extra tests of defined()
identifiers for _lint and _M_I86).

Is there a specific group for reporting such bugs?

Chris C
Technical Details
Message-ID: <slrnci4300.o06.chris@ccserver.keris.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail
References: <slrncgs56p.j46.chris@ccserver.keris.net> <410f6b8a@newsgroups.borland.com> <slrncgvo3t.5n3.chris@ccserver.keris.net> <4110bf9b@newsgroups.borland.com> <41113590$1@newsgroups.borland.com> <slrnch2mml.ofk.chris@ccserver.keris.net> <opsb9as3elbvaws7@dk-tzx09ucg42z4.s1.sol1.co.uk> <slrnch700h.6t9.chris@ccserver.keris.net> <opscbb6go4kpth9y@athlete> <slrnch7t24.it8.chris@ccserver.keris.net> <opsctvvlh1bvaws7@dk-tzx09ucg42z4.s1.sol1.co.uk> <slrnci1vne.9n7.chris@ccserver.keris.net> <opscu9vmdqkpth9y@athlete>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10d0fc,56d63b5f0bddbea3
X-Google-Attributes: gid10d0fc,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail
From: Chris Croughton <chris@keristor.net>
Newsgroups: borland.public.cppbuilder.multimedia
Subject: Re: Recording 24-bit audio -- now working!
Date: Tue, 17 Aug 2004 14:45:37 +0100
Lines: 44
Message-ID: <slrnci4300.o06.chris@ccserver.keris.net>
References: <slrncgs56p.j46.chris@ccserver.keris.net> <410f6b8a@newsgroups.borland.com> <slrncgvo3t.5n3.chris@ccserver.keris.net> <4110bf9b@newsgroups.borland.com> <41113590$1@newsgroups.borland.com> <slrnch2mml.ofk.chris@ccserver.keris.net> <opsb9as3elbvaws7@dk-tzx09ucg42z4.s1.sol1.co.uk> <slrnch700h.6t9.chris@ccserver.keris.net> <opscbb6go4kpth9y@athlete> <slrnch7t24.it8.chris@ccserver.keris.net> <opsctvvlh1bvaws7@dk-tzx09ucg42z4.s1.sol1.co.uk> <slrnci1vne.9n7.chris@ccserver.keris.net> <opscu9vmdqkpth9y@athlete>
Reply-To: chris@keristor.net
X-Trace: news.uni-berlin.de EXyBahKqoPMEHyfqDYYxYgK3sdAA8K9cE9wgr+esyMUljhY/g=
X-Orig-Path: ccserver.keris.net!news
User-Agent: slrn/0.9.7.4 (Linux)