| 1. |
Solve : Sound in MS-DOS? |
|
Answer» I wondered if there is some thirdy party tool that can play a sound file. I know there is mplay32 but when it plays a sound it opens a window and I want something that plays in the same command promt as the other commands. I hope I make my point clear. As many will think at first, I have tried some but none of them worked. Also the thing I wanna make is a launcher that's why I need the program to show no window.Had a look at Playwav.exe? As the name suggests it only plays .Wav files but might suit your purpose. See here.Thanks that will do nicely. Now if you happen to know any like that for MP3 files or any that does not wait to keep RUNNING the rest of the commands that would be perfect.I think there is a mp3 player for linux that runs from terminal shell, but that wont help you with M$ OS. The biggest issue is that MP3 is newer than legacy DOS, and all players use a codec written around a GUI. Many software apps still use *.wav for their audio as WELL, since I know there are wave players for DOS, and I have written C++ before many years ago in college, that played out Wave files for games etc. Is there a reason to why you dont want to convert your MP3 to a WAV file?Quote from: DaveLembke on December 29, 2010, 02:40:58 PM I think there is a mp3 player for linux that runs from terminal shell, but that wont help you with M$ OS. The biggest issue is that MP3 is newer than legacy DOS, and all players use a codec written around a GUI. Not all. It's about time somebody mentioned mplayer. Honestly! I despair sometimes. Anyway NT command is not "legacy DOS", and the OP made it clear he means Win32. Code: [Select]C:\MPlayer-rtm-svn-32735>mplayer "04 Don't Go.mp3" MPlayer Sherpya-SVN-r32735-4.2.5 (C) 2000-2010 MPlayer Team 161 audio & 356 video codecs Playing 04 Don't Go.mp3. Audio only file format detected. ========================================================================== Opening audio decoder: [mp3lib] MPEG layer-2, layer-3 AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400) Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3) ========================================================================== AO: [dsound] 44100Hz 2ch s16le (2 bytes per sample) Video: no video Starting playback... You can pipe the console output to nul if you don't want anything on the screen. There's probably a "quiet" switch (i.e. no screen output) in any case. Hours of fun. And open source too. Code: [Select]C:\MPlayer-rtm-svn-32735>mplayer "04 Don't Go.mp3">nul >nul Cool!!! I was thinking that any Win32 player would pop up a window. That >NUL I guess is the fix to that issue, and I wasnt aware of that ability.Quote from: DaveLembke on December 29, 2010, 04:21:10 PM >nul Cool!!! I was thinking that any Win32 player would pop up a window. That >NUL I guess is the fix to that issue, and I wasnt aware of that ability. No. the >NUL redirects the console output it would otherwise show.Quote from: DaveLembke on December 29, 2010, 04:21:10 PM >nul Cool!!! I was thinking that any Win32 player would pop up a window. That >NUL I guess is the fix to that issue, and I wasnt aware of that ability. Either I did not write my post clearly enough, or you did not read it PROPERLY. Whatever. I know you thought that "any Win32 player" must have a GUI. You were wrong. You wrote this... Quote from: DaveLembke on December 29, 2010, 09:40:58 PM I think there is a mp3 player for linux that runs from terminal shell, but that wont help you with M$ OS. The biggest issue is that MP3 is newer than legacy DOS, and all players use a codec written around a GUI. ...and I wrote this... Not all. It's about time somebody mentioned mplayer. mplayer (Linux and Windows versions available) does not have a GUI. It is a purely console APPLICATION unless you ask it to play a video file, in which case it pops up a very basic window for the duration of the video. All control is by the keyboard. If you ask it to play an audio file any screen output is to the same console window that called mplayer, and, like any other console app, you can redirect the output. However, before using mplayer as a means of playing audio files unattended, it may be as well to study the documentation to find out about the various (huge number!) of command line switches and options. Well the reason I want to use .mp3 is just for saving space as they are significantly smaller in size. As for mplayer I see that I must compile the source code and I really suck at that kind of stuff. I also saw that there is a list of builds for windows but I don't know which one should I pick.Quote from: Irineos on December 30, 2010, 09:44:14 AM Well the reason I want to use .mp3 is just for saving space as they are significantly smaller in size. As for mplayer I see that I must compile the source code and I really suck at that kind of stuff. I also saw that there is a list of builds for windows but I don't know which one should I pick. You don't have to compile the source code. I know the website says it is "recommended" but that's for Linux geeks and people who want to mess around with the code. Just download the latest Windows build. At the moment it is version 32735 http://sourceforge.net/projects/mplayer-win32/files/MPlayer%20and%20MEncoder/revision%2032735/MPlayer-rtm-svn-32735.7z/download Or look here http://sourceforge.net/projects/mplayer-win32/files/MPlayer%20and%20MEncoder/ |
|