Sponsored Content
Top Forums Shell Programming and Scripting Experimental awk audio converter for CygWin and AudioScope.sh Post 302923401 by RudiC on Sunday 2nd of November 2014 02:37:03 PM
Old 11-02-2014
If I get you right, what you want to do per sample point is strip the low byte and then XOR with 0X80. Try this with mere shell (recent bash) builtins:
Code:
 hexdump -v -e '4/1 "0x%02X " "\n"' /tmp/sample.raw | while read _ LL _ RR; do printf "x%x x%x\n" $((LL^128)) $((RR^128)); done | while read LL RR; do printf "\\$LL\\$RR"; done

 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Row to column converter using Awk or grep?

Hello, Can someone please help me on this.:confused: I have a file which has more than 1 million lines (XML file). What I need is: Search for "abcd" in the input file > output the result into a output.txt (colloum1) Search for "efghi" in the input file > output the result in to... (3 Replies)
Discussion started by: Needhelp2
3 Replies

2. Slackware

Problems with audio recording in Audacity 2.0.5. Slackware64 14.1; Intel HD Audio.

I'm trying to record audio using Audacity 2.0.5 installed from SlackBuilds. My system is 64-bit Slackware 14.1 and a sound card is Intel HD Audio. I didn't change my sound system to OSS. (Default sound system in Slackware 14.1 is ALSA, isn't it?) First, I set Internal Microphone slider in KMix... (2 Replies)
Discussion started by: qzxcvbnm
2 Replies

3. What is on Your Mind?

AudioScope...

Boy oh boy, with only a MONO mic input to use AudioScope gets much more difficult when the ALTDC board is included. It needs, so far, two hits at the MIC input with a single hit at the HEADPHONE audio output. The first at the highest practical resolution for the AC component and the second... (0 Replies)
Discussion started by: wisecracker
0 Replies

4. UNIX for Beginners Questions & Answers

Command awk under CYGWIN

One my friend wrote one script on his machine linux, when I try to use it under cygwin I recive one error about the command awk. Is there someone can suggest me the way to fix the error? The script is wrote using gawk and I have no idea what kind of comand is used by cygwin. This is the script:... (8 Replies)
Discussion started by: Tapiocapioca
8 Replies

5. OS X (Apple)

AudioScope Project.

AudioScope Project. (Apologies for any typos.) For the few following...... AudioScope.sh... Now at Version 0.60.00. Well this baby has come a long way since its inception in January 2013. It is now at Version 0.60.00. It is MUCH more Apple centric now with a new OSX Sierra minimum _silent_... (7 Replies)
Discussion started by: wisecracker
7 Replies
TIFFReadScanline(3TIFF) 												   TIFFReadScanline(3TIFF)

NAME
TIFFReadScanline - read and decode a scanline of data from an open TIFF file SYNOPSIS
#include <tiffio.h> int TIFFReadScanline(TIFF *tif, tdata_t buf, uint32 row, tsample_t sample) DESCRIPTION
Read the data for the specified row into the (user supplied) data buffer buf. The data are returned decompressed and, in the native byte- and bit-ordering, but are otherwise packed (see further below). The buffer must be large enough to hold an entire scanline of data. Appli- cations should call the routine TIFFScanlineSize to find out the size (in bytes) of a scanline buffer. The row parameter is always used by TIFFReadScanline; the sample parameter is used only if data are organized in separate planes (PlanarConfiguration=2). NOTES
The library attempts to hide bit- and byte-ordering differences between the image and the native machine by converting data to the native machine order. Bit reversal is done if the FillOrder tag is opposite to the native machine bit order. 16- and 32-bit samples are automati- cally byte-swapped if the file was written with a byte order opposite to the native machine byte order, In C++ the sample parameter defaults to 0. RETURN VALUES
TIFFReadScanline returns -1 if it detects an error; otherwise 1 is returned. DIAGNOSTICS
All error messages are directed to the TIFFError(3TIFF) routine. Compression algorithm does not support random access. Data was requested in a non-sequential order from a file that uses a compression algorithm and that has RowsPerStrip greater than one. That is, data in the image is stored in a compressed form, and with multiple rows packed into a strip. In this case, the library does not support random access to the data. The data should either be accessed sequentially, or the file should be converted so that each strip is made up of one row of data. BUGS
Reading subsampled YCbCR data does not work correctly because, for PlanarConfiguration=2 the size of a scanline is not calculated on a per- sample basis, and for PlanarConfiguration=1 the library does not unpack the block-interleaved samples; use the strip- and tile-based inter- faces to read these formats. SEE ALSO
TIFFOpen(3TIFF), TIFFReadEncodedStrip(3TIFF), TIFFReadRawStrip(3TIFF), libtiff(3TIFF) Libtiff library home page: http://www.remotesensing.org/libtiff/ libtiff October 15, 1995 TIFFReadScanline(3TIFF)
All times are GMT -4. The time now is 08:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy