Sponsored Content
Top Forums UNIX for Advanced & Expert Users Redirection? (I do find some of the strangest things.) Post 302989240 by wisecracker on Tuesday 10th of January 2017 09:39:41 AM
Old 01-10-2017
Quote:
Originally Posted by RudiC
Did you check the exit code of the command in either case?
No. As it is unimportant; I just don't want it to show nor crash out when a relatively serious error occurs but to be ignored. These are three lines in the code to suit:-
1) \dev\dsp for CygWin, OSS and PulseAudio for Linux.
2) ALSA for Linux ALSA sound systems.
3) OSX 10.12.x or maybe earlier.
If any one fails just ignore and carry on to the next. One of them will work.
Code:
# CygWin /dev/dsp, Linux OSS or PulseAudio.
> /dev/null 2>&1 cat /tmp/noise.raw > /dev/dsp
# Linux ALSA.
aplay /tmp/noise.wav > /dev/null 2>&1
# Apple OSX 10.12.x and greater.
afplay /tmp/noise.wav > /dev/null 2>&1

As Apple OSX 10.7.x at least has 'afplay' by default on a virgin install then there should be no reason for the code to fail.
CygWin(64) has /dev/dsp in a default virgin install.
Linux is variable as it could have either ALSA, OSS or PulseAudio sound systems.
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

i get the strangest feeling that lilo hates me.

i need to get rid of lilo's splash screen. i've heard that you can edit your /etc/lilo.conf and add this line: <b>append="splash=0"</b> anyway, i did that and i still have a splash screen. any idea why that didn't work, or what is another way to disable the splash screen? okay, -nydel (1 Reply)
Discussion started by: nydel
1 Replies

2. Programming

Complicating things?

So basically what im trying to do is ... Open file, read that file, than try to find .. We or we and replace them with I, but not replace the cases where words contain We or we, such as Went, went, etc a and replace them with the, but not replace the cases where words contain a, such as... (1 Reply)
Discussion started by: bconnor
1 Replies

3. Programming

Question about several things in C

Hey guys, first of all I'd like to say Hi to everyone. I am new here and this is my first post. I have a question about some C stuff. I am in Computer Science and I have an assignment for a UNIX Applications course. It is really complicated, however. We're using the C language for this and... (1 Reply)
Discussion started by: V4D3R
1 Replies

4. UNIX for Advanced & Expert Users

shell redirection in find

hi, i need to clear data off a DOA backup drive. i try this, but just get a file {} in . and no change on the backup drive. bash shell find /mnt/usbbackup -xdev -type f -exec echo `date` > {} \; any ideas? thanks. :) (1 Reply)
Discussion started by: drewnichols
1 Replies

5. UNIX for Dummies Questions & Answers

Just trying to find out a few things ....

Hi everyone Just a couple of quick questions if I may. Can I ask what is meant by "flavours"?? I've come across it many times in the forums and I'm guessing that it is a variery of either Linux or UNIX (I know nil about either) which has developed but not really got a clue. ... (1 Reply)
Discussion started by: Tiramisu
1 Replies

6. Shell Programming and Scripting

Several exec on find send all the output to the last redirection

Example script: find mydir -type f -exec echo {}>aaa \; -exec echo {}>bbb \;The two paths go the the bbb file, while there should be one of them on each file. How should I do it to get it working? (2 Replies)
Discussion started by: Tribe
2 Replies
XWAX(1) 						      General Commands Manual							   XWAX(1)

NAME
xwax - Digital vinyl on Linux SYNOPSIS
xwax [options] DESCRIPTION
xwax is vinyl emulation software for Linux. It allows DJs and turntablists to playback digital audio files (MP3, Ogg Vorbis, FLAC, AAC and more), controlled using a normal pair of turntables via timecoded vinyls. OPTIONS
The ordering of options is important; many options apply to to subsequent music libraries or decks, which can be given multiple times. See the EXAMPLES below. -l path Scan the music library at the given path. -p path Load a playlist at the given path. This operation is identical to scanning a music library except that the order is defined by the output of the scanner executable. -t name Use the named timecode for subsequent decks. See -h for a list of valid timecodes. You will need the corresponding timecode signal on vinyl to control playback. -33 Set the reference playback speed for subsequent decks to 33 and one third revolutions per minute. This is the default. -45 Set the reference playback speed for subsequent decks to 45 revolutions per minute. -i path Use the given importer executable for subsequent decks. -s path Use the given scanner executable to scan subsequent music libraries. -h Display the help message and default values. ALSA DEVICE OPTIONS
The following options are available only when xwax is compiled with ALSA support. -a device Create a deck which uses the given ALSA device (eg. plughw:0). -r hz Set the sample rate for subsequent decks. -m milliseconds Set the ALSA buffer time for subsequent decks. JACK DEVICE OPTIONS
The following options are available only when xwax is compiled with JACK support. -j name Create a deck which connects to JACK and registers under the given name. xwax does not set the sample rate for JACK devices; it uses the sample rate given in the global JACK configuration. OSS DEVICE OPTIONS
The following options are available only when xwax is compiled with OSS support. -d pathname Create a deck which uses the given OSS device (eg. /dev/dsp). -r hz Set the sample rate for subsequent decks. -b n Set the number of OSS buffers for subsequent decks. -f n Set the OSS buffer size (2^n bytes). CONTROLS
The playback of each deck (direction, speed and position) is controlled via the incoming timecode signal from the turntables. The keyboard provides additional controls. Record selection controls: cursor up, cursor down Move highlighted record up/down by one. page up, page down Scroll the record listing up/down by one page. left cursor, right cursor Switch to the previous/next crate of records. tab Toggle between the current crate and the 'All records' crate. To filter the current list of records type a portion of a record name. Separate multiple searches with a space, and use backspace to delete. Deck-specific controls: Deck 0 Deck 1 Deck 2 F1 F5 F9 Load currently selected track to this deck F2 F6 F10 Reset start of track to the current position F3 F7 F11 Toggle timecode control on/off Audio display controls: +, - Zoom in/out the close-up audio meters for all decks. EXAMPLES
2-deck setup using one directory of music and OSS devices: xwax -l ~/music -d /dev/dsp -d /dev/dsp1 As above, but using ALSA devices: xwax -l ~/music -d hw:0 -d hw:1 2-deck setup using a different timecode on each deck: xwax -l ~/music -t serato_2a -d hw:0 -t mixvibes_v2 -d hw:1 As above, but with the second deck at 45 RPM: xwax -l ~/music -t serato_2a -d hw:0 -t mixvibes_v2 -45 -d hw:1 3-deck setup with the third deck at a higher sample rate: xwax -l ~/music -r 48000 -a hw:0 -a hw:1 -r 96000 -a hw:2 Using all three device types simultaneously, one deck on each: xwax -l ~/music -a hw:0 -d /dev/dsp1 -j jack0 Scan multiple music libraries: xwax -l ~/music -l ~/sounds -l ~/mixes -a hw:0 Scan a second music library using a custom script: xwax -l ~/music -i ./custom-scan -l ~/sounds -a hw:0 HOMEPAGE
http://www.xwax.co.uk/ AUTHOR
Mark Hills <mark@pogo.org.uk> XWAX(1)
All times are GMT -4. The time now is 04:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy