[提交译文][tech]:20210615 Listen to music on FreeDOS.md

This commit is contained in:
hanszhao80 2022-05-14 17:15:40 +08:00
parent 6481fc828c
commit a91b4769e6
2 changed files with 99 additions and 99 deletions

View File

@ -1,99 +0,0 @@
[#]: subject: (Listen to music on FreeDOS)
[#]: via: (https://opensource.com/article/21/6/listen-music-freedos)
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
[#]: collector: (lujun9972)
[#]: translator: (hanszhao80)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
Listen to music on FreeDOS
======
Mplayer is an open source media player that's usually found on Linux,
Windows, Mac, and DOS.
![Woman programming][1]
Music is a great way to relax. On Linux, I listen to music using Rhythmbox. But did you know you can listen to music on FreeDOS, as well? Let's take a look at two popular programs to listen to music:
### Listen to music with Mplayer
[Mplayer][2] is an open source media player that's usually found on Linux, Windows, and Mac—but there's a DOS version available, too. And that's the version we include in FreeDOS. While the DOS port is based on an older version (version 1.0rc2-3-3-2 from 2007) it is perfectly serviceable for playing media on DOS.
I use Mplayer to listen to music files on FreeDOS. For this example, I've copied one of my favorite audiobooks, Doctor Who: Flashpoint by [Big Finish Productions][3], and saved it as `C:\MUSIC\FLASHPNT.MP3` on my FreeDOS computer. To listen to Flashpoint on FreeDOS, I launch Mplayer from the FreeDOS command line and specify the MP3 filename to play. The basic usage of Mplayer is `mplayer [options] filename` so if the default settings work well for you, then you can just launch Mplayer with the filename. In this case, I ran these commands to change my working directory to `\MUSIC` and then run Mplayer with my MP3 audiobook file:
```
CD \MUSIC
MPLAYER FLASHPNT.MP3
```
FreeDOS is _case insensitive_, so it will accept uppercase or lowercase letters for DOS commands and any files or directories. You could also type `cd \music` or `Cd \Music` to move into the Music directory, and that would work the same.
![mplayer on FreeDOS][4]
You can use Mplayer to listen to MP3 files
(Jim Hall, [CC-BY SA 4.0][5])
Using Mplayer is a "no frills" way to listen to music files on FreeDOS. But at the same time, it's not distracting, so I can leave FreeDOS to play the MP3 file on my DOS computer while I use my other computer to do something else. However, FreeDOS runs tasks one at a time (in other words, DOS is a "single-tasking" operating system) so I cannot run Mplayer in the "background" on FreeDOS while I work on something else _on the same FreeDOS computer_.
Note that Mplayer is a big program that requires a lot of memory to run. While DOS itself doesn't require much RAM to operate, I recommend at least 16 megabytes of memory to run Mplayer.
### Listen to audio files with Open Cubic Player
FreeDOS offers more than just Mplayer for playing media. We also include the [Open Cubic Player][6], which supports a variety of file formats including Midi and WAV files.
In 1999, I recorded a short audio file of me saying, "Hello, this is Jim Hall, and I pronounce 'FreeDOS' as _FreeDOS_." This was meant as a joke, riffing off of a [similar audio file][7] (`english.au`, included in the Linux source code tree in 1994) recorded by Linus Torvalds to demonstrate how he pronounces "Linux." We don't distribute the _FreeDOS_ audio clip in FreeDOS itself, but you are welcome to download it from our [Silly Sounds][8] directory, found in the FreeDOS files archive at [Ibiblio][9].
You can listen to the _FreeDOS_ audio clip using the Open Cubic Player. To run Open Cubic Player, you normally would run `CP` from the `\APPS\OPENCP` directory. However, Open Cubic Player is a 32-bit application that requires a 32-bit DOS extender. A common DOS extender is DOS/4GW. While free to use, DOS/4GW is not an open source program, so we do not distribute it as a FreeDOS package.
Instead, FreeDOS provides another open source 32-bit extender called DOS/32A. If you did not install everything when you installed FreeDOS, you may need to install it using [FDIMPLES][10]. I used these two commands to move into the `\APPS\OPENCP` directory, and to run Open Cubic Player using the DOS/32A extender:
```
CD \APPS\OPENCP
DOS32A CP
```
Open Cubic Player doesn't sport a fancy user interface, but you can use the arrow keys to navigate the _File Selector_ to the directory that contains the media file you want to play.
![Open Cubic Player][11]
Open Cubic Player opens with a file selector
(Jim Hall, [CC-BY SA 4.0][5])
The text appears smaller than in other DOS applications because Open Cubic Player automatically changes the display to use 50 lines of text, instead of the usual 25 lines. Open Cubic Player will reset the display back to 25 lines when you exit the program.
When you have selected your media file, Open Cubic Player will play it in a loop. (Press the Esc key on your keyboard to quit.) As the file plays over the speakers, Open Cubic Player displays a spectrum analyzer so you can see the audio for the left and right channels. The _FreeDOS_ audio clip is recorded in mono, so the left and right channels are the same.
![Open Cubic Player][12]
Open Cubic Player playing the "FreeDOS" audio clip
(Jim Hall, [CC-BY SA 4.0][5])
DOS may be from an older era, but that doesn't mean you can't use FreeDOS to run modern tasks or play current media. If you like to listen to digital music, try using Open Cubic Player or Mplayer on FreeDOS.
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/6/listen-music-freedos
作者:[Jim Hall][a]
选题:[lujun9972][b]
译者:[hanszhao80](https://github.com/hanszhao80)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jim-hall
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (Woman programming)
[2]: https://en.wikipedia.org/wiki/MPlayer
[3]: https://bigfinish.com/
[4]: https://opensource.com/sites/default/files/uploads/mplayer.png (You can use Mplayer to listen to MP3 files)
[5]: https://creativecommons.org/licenses/by-sa/4.0/
[6]: https://www.cubic.org/player/
[7]: https://commons.wikimedia.org/wiki/File:Linus-linux.ogg
[8]: https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/sillysounds/
[9]: https://www.ibiblio.org/
[10]: https://opensource.com/article/21/6/freedos-package-manager
[11]: https://opensource.com/sites/default/files/uploads/opencp1.png (Open Cubic Player opens with a file selector)
[12]: https://opensource.com/sites/default/files/uploads/opencp2.png (Open Cubic Player playing the "FreeDOS" audio clip)

View File

@ -0,0 +1,99 @@
[#]: subject: (Listen to music on FreeDOS)
[#]: via: (https://opensource.com/article/21/6/listen-music-freedos)
[#]: author: (Jim Hall https://opensource.com/users/jim-hall)
[#]: collector: (lujun9972)
[#]: translator: (hanszhao80)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
在 FreeDOS 中聆听音乐
======
Mplayer 是Linux、Windows、Mac 和 Dos 等操作系统上常见的一款开源媒体播放器。
![正在编程的女性][1]
听音乐是放松心情的好方法。在 Linux 上,我使用 Rhythmbox 听音乐。但是你可能不知道在 FreeDOS 上也可以听音乐。让我们看一下两款流行的音乐播放器吧:
### 用 Mplayer 听音乐
[Mplayer][2] 是一款开源的媒体播放器,通常安装于 Linux、Windows 和 Mac 上,但也有 DOS 版本可用。这里我们讨论的就是在 FreeDOS 版本。虽然 DOS 端口基于旧版2007年的 1.0rc2-3-3-2 版),但它完全适用于在 DOS 上播放媒体。
我使用 MPlayer 在 FreeDOS 上听音乐文件。在这个例子中,我复制了我最喜欢的有声读物之一,[Big Finish Productions][3] 的<ruby>神秘博士<rt>Doctor Who</rt></ruby><ruby>闪点行动<rt>Flashpoint</rt></ruby>,并在我的 FreeDOS 计算机上将其保存为 `C:\MUSIC\FLASHPNT.MP3`。为了在 FreeDOS 上收听 <ruby>闪点行动<rt>Flashpoint</rt></ruby>,我从 FreeDOS 命令行启动 MPlayer 并指定要播放的 MP3 文件名。MPlayer 的基本用法是 `mplayer [options] filename`如果默认设置可用你应该可以直接使用文件名启动MPlayer。在本例中我运行以下命令将工作目录切换为 `\MUSIC`,然后使用 MPlayer 播放我的 MP3 有声读物文件:
```
CD \MUSIC
MPLAYER FLASHPNT.MP3
```
FreeDOS _不区分大小写_,因此它将忽略 DOS 命令和任何文件或目录的大小写字母的区别。你键入 `cd \music``Cd \Music` 都可以切换到 Music 目录,效果相同。
![FreeDOS 上的 Mplayer][4]
你可以用 Mplayer 播放 MP3 文件
(Jim Hall, [CC-BY SA 4.0][5])
使用 MPlayer 在 FreeDOS 播放音乐文件时没有花哨的界面。但同时,它也不会分散注意力。所以我可以一边让 FreeDOS 在我的 DOS 计算机上播放 MP3 文件一边使用另一台计算机做其他事情。然而FreeDOS一次只运行一个任务换句话说DOS 是一个<ruby>单任务<rt>single-tasking</rt></ruby>操作系统),所以我不能将 MPlayer 置于 FreeDOS的”后台“运行而在 _同一台 FreeDOS 机_ 上处理其他事情。
请注意MPlayer 是一个需要大量内存才能运行的大程序。虽然 DOS 本身并不需要太多的内存来运行但我建议至少有16兆的内存来运行 MPlayer。
### 使用 Open Cubic Player 听音频文件
FreeDOS 不止提供了 MPlayer 来播放媒体。还有 [Open Cubic Player][6],它支持多种文件格式,包括 Midi 和 WAV 文件。
1999年我录制了一段简短的音频文件内容是我说“你好我是 Jim Hall我把 'FreeDOS' 发音为 _FreeDOS_。"这是一个玩笑,借鉴了 Linus Torvalds 录制的演示他如何发音 Linux 的 [类似的音频文件][7]`English.au`包含在1994年的 Linux 源代码树中)中的创意。我们不会在 FreeDOS 中分发这段 _FreeDOS_ 音频剪辑,但欢迎你从我们的[Silly Sounds][8]目录中下载它,该目录位于 [Ibiblio][9] 的 FreeDOS 文件存档中。
你可以使用 Open Cubic Player 收听 _FreeDOS_ 音频剪辑。通常从 `\APPS\OPENCP` 目录键入 `CP` 命令运行 Open Cubic Player。但 Open Cubic Player 是32位应用程序运行它需要32位 DOS 扩展器。常见的 DOS 扩展器是 DOS/4GW。虽然可以免费使用但 DOS/4GW 不是开源程序,因此我们不会将其作为 FreeDOS 包分发。
相反FreeDOS 提供了另一个名为 DOS/32A 的开源32位扩展器。如果你在安装FreeDOS时没有安装所有内容则可能需要使用 [FDIMPLES][10] 进行安装。我使用这两行命令切换到 `\APPS\OPENCP` 路径,并使用 DOS/32A 扩展器运行 Open Cubic Player
```
CD \APPS\OPENCP
DOS32A CP
```
Open Cubic Player 没有花哨的用户界面,但你可以使用方向键将 _<ruby>文件选择器<rt>File Selector</rt></ruby>_ 导航到包含要播放的媒体文件的目录。
![Open Cubic Player][11]
Open Cubic Player 打开文件选择器
(Jim Hall, [CC-BY SA 4.0][5])
文本比在其他 DOS 应用程序中显示的要小,因为 Open Cubic Player 会自动将显示更改为使用50行文本而不是通常的25行。当你退出程序时Open Cubic Player 会将显示重置为25行。
选择媒体文件后Open Cubic Player 将循环播放该文件(按键盘上的 Esc 键退出。当文件通过扬声器播放时Open Cubic Player 会显示一个频谱仪,以便你可以观察左右声道的音频。 _freedos_ 音频剪辑是以单声道录制的,因此左右声道是相同的。
![Open Cubic Player][12]
Open Cubic Player 中播放 ”FreeDOS“ 音频文件
(Jim Hall, [CC-BY SA 4.0][5])
DOS 可能来自较早的年代,但这并不意味着你不能使用 FreeDOS 来执行现代任务或播放当前的媒体。如果你喜欢听数字音乐,试一试在 FreeDOS上 使用 Open Cubic Player 或 MPlayer 吧!
--------------------------------------------------------------------------------
via: https://opensource.com/article/21/6/listen-music-freedos
作者:[Jim Hall][a]
选题:[lujun9972][b]
译者:[hanszhao80](https://github.com/hanszhao80)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/jim-hall
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (Woman programming)
[2]: https://en.wikipedia.org/wiki/MPlayer
[3]: https://bigfinish.com/
[4]: https://opensource.com/sites/default/files/uploads/mplayer.png (You can use Mplayer to listen to MP3 files)
[5]: https://creativecommons.org/licenses/by-sa/4.0/
[6]: https://www.cubic.org/player/
[7]: https://commons.wikimedia.org/wiki/File:Linus-linux.ogg
[8]: https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/sillysounds/
[9]: https://www.ibiblio.org/
[10]: https://opensource.com/article/21/6/freedos-package-manager
[11]: https://opensource.com/sites/default/files/uploads/opencp1.png (Open Cubic Player opens with a file selector)
[12]: https://opensource.com/sites/default/files/uploads/opencp2.png (Open Cubic Player playing the "FreeDOS" audio clip)