Bugs item #3587421, was opened at 2012-11-14 23:26
Message generated for change (Tracker Item Submitted) made by hselasky
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110706&aid=3587421&group_id=10706
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: verified
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: HPS (hselasky)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bugs in src/oss.c
Initial Comment:
Hi,
First observation:
oss.c: In function 'ossinit':
oss.c:116: warning: dereferencing 'void *' pointer
oss.c:116: error: request for member '_file' in something not a structure or
union
oss.c:124: warning: dereferencing 'void *' pointer
oss.c:124: error: request for member '_file' in something not a structure or
union
oss.c:163: warning: dereferencing 'void *' pointer
oss.c:163: error: request for member '_file' in something not a structure or
union
oss.c:176: warning: dereferencing 'void *' pointer
oss.c:176: error: request for member '_file' in something not a structure or
union
oss.c:186: warning: dereferencing 'void *' pointer
oss.c:186: error: request for member '_file' in something not a structure or
union
oss.c:205: warning: dereferencing 'void *' pointer
oss.c:205: error: request for member '_file' in something not a structure or
union
oss.c:214: warning: dereferencing 'void *' pointer
oss.c:214: error: request for member '_file' in something not a structure or
union
Fixed by renaming fileno( into sox_fileno( and defining this:
#define sox_fileno(x) fileno((FILE *)(x))
Second observation:
Default audio driver is not OSS.
env AUDIODEVICE=/dev/dsp AUDIODRIVER=oss rec test.wav
Third observation:
GIO syscalls are still used, and the length is 1 byte. You can check this using
strace or ktrace.
15260 sox RET read 1
15260 sox CALL read(0x3,0x807b2de37,0x1)
15260 sox GIO fd 3 read 1 byte
0x0000 ff
Patch needed:
/* Change to non-buffered I/O */
setvbuf(ft->fp, NULL, _IONBF, sizeof(char) * file->size);
return(SOX_SUCCESS);
}
Change to:
/* Change to non-buffered I/O */
setvbuf(ft->fp, NULL, _IOFBF, sizeof(char) * file->size);
return(SOX_SUCCESS);
}
--HPS
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=110706&aid=3587421&group_id=10706
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
SoX-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sox-devel