Sound Player Os X
OS X 10.5 includes a command line audio player (in /usr/bin) called afplay. This is very useful if you want to play a sound file from the command line, shell script, Automator action, etc. Ps2 emulator download for pc. The /usr/bin directory is in your path by default, so you can just type afplay file.mp3 to play that file. Afplay makes use of Core Audio, so I think it can play any audio file that QuickTime supports (including mp3, aiff, wav, etc.). If any one is interested, Apple also provides the source code for this application with the Xcode developer tools.
Ever wanted to play sound through multiple audio devices on your Mac OS X system? There is, however, a way to play sound simultaneously through external speakers and the internal (or, the headphones—whether connected to headphones or another set of external speakers).
You'll find it in this folder: /Developer » Examples » CoreAudio » Services » AudioFileTools. [ robg adds: There's a very simple man page for afplay, which then tells you that help is available with afplay -h.
There are a few interesting options, including the ability to play a defined (in time) segment of a file, and to play a file to a defined audio output device.]. Don't worry that you're doing something wrong. You're correct. Using & puts it in the background of the shell, but if you kill the shell, you kill that application as well. (Applications don't run without a controller of some manner.) You have two options, and both may be a bit more involved than you want to be. One is that you can use the 'nohup' command to continue command execution even if the shell goes away.
Or you can learn how to use the 'screen' command. Nohup will continue command execution until completion (or failure, either way a program exit), and then it'll go away. Screen is a 'terminal multiplexer', it allows you to turn one terminal into many all self contained. How to create a boot disk for mac high sierra. It serves an excellent second purpose that if you're doing something (say, ssh'ed into a remote server) and your connection goes away, everything you were doing inside screen continues to run, or everything you have done remains there in context until you reconnect to the server and resume screen. This of course works locally.
Be forewarned this is a VERY extreme example. If you're running screen, and terminal crashes, nothing happens to screen. It's all still there to reconnect to when you re-open Terminal and reconnect to it. The only thing screen doesn't do is survive a reboot (go figure). It'll take a little bit of learning to get used to it (the man page is VERY big), but I absolutely swear by screen.
There's an easier way to close a terminal window (which is not the preferred way to end the shell inside it---similar to using 'force quit' to end safari instead of the quit menu command) without OS X whining or killing the programs you've started: Instead of ending a command with '&', end it with '& disown' (no quotes, of course). Note: This will work for essentially *any* program, but if there are semi-colons (;) in the line you typed, you are running more than one program and simply adding ' & disown' to the end of the line may not be sufficient to get the behavior you want. I am sure the OP gave up on this page long ago, but in case future readers who stumble on this page are daunted by your suggestions (valid though they are), I though this very simple fix would be useful. This is a little complicated - the full details are far too involved to go into right here. However, the bottom line is that you can control whether a shell's subprocesses (bash = your shell) are terminated, when the shell is terminated. By default, I don't think bash itself terminates its backgrounded children, when you exit bash (by typing control-D or exit). That is, it does not terminate its children on my system, but I've long forgotten if that was something I configured myself, or the default behavior.
I think it's default behaviour though - pretty sure. However, from just testing now, it appears that if you click the red 'close' button, Terminal itself terminates bash AND its children for you. So the simple solution might be to close your shell by typing 'exit' or control-D instead of clicking the close button. What actually happens when you click the red 'close' button is that the system sends a TERM (exit) signal to the shell - and when bash receives a TERM signal, it sends a TERM to all of its children before it exits itself.