China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 22:46
中国DOS联盟论坛 » DOS媒体世界 & 网络技术 (多媒体室) » I rewrote a program that can play WAV sounds using wws.c, everyone test it View 3,604 Replies 21
Original Poster Posted 2004-09-14 00:00 ·  中国 广东 深圳 联通
初级用户
Credits 158
Posts 23
Joined 2004-09-08 00:00
21-year member
UID 31210
Gender Male
Status Offline
After tossing and turning all day, I finally can use this program to play WAV songs. I was really excited when I could hear the sound. But the sound under DOS isn't that pleasant either. Maybe the reverb effect from the driver is too bad. The program is written very roughly, only supporting the simplest uncompressed WAV format. Everyone just take it and listen for now. After all, there's sound.
Floor 2 Posted 2004-09-15 00:00 ·  中国 广东 深圳 联通
初级用户
Credits 158
Posts 23
Joined 2004-09-08 00:00
21-year member
UID 31210
Gender Male
Status Offline
The file format is incorrect or it cannot be empty
==============================
??? Why does this error always occur? Moderator?
Floor 3 Posted 2004-09-15 00:00 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
It hasn't been uploaded yet. If you want to upload, you can first compress it into.ZIP or.RAR format and then upload, but you can't upload directly with.EXE.

However, there are many programs that can play WAV under DOS, such as QV, MPXPLAY and so on, and the playback effect is also good.

It's just that many AC97 sound cards seem to have no DOS driver programs, so there is no sound at all.. (except MAME)
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 4 Posted 2004-09-15 00:00 ·  中国 广东 深圳 联通
初级用户
Credits 158
Posts 23
Joined 2004-09-08 00:00
21-year member
UID 31210
Gender Male
Status Offline
Just play it directly.
Floor 5 Posted 2004-09-15 00:00 ·  中国 广东 深圳 联通
初级用户
Credits 158
Posts 23
Joined 2004-09-08 00:00
21-year member
UID 31210
Gender Male
Status Offline
Open attachment

It is to directly use the functions in wws.c to play sound
Floor 6 Posted 2004-09-15 00:00 ·  中国 广东 深圳 联通
初级用户
Credits 158
Posts 23
Joined 2004-09-08 00:00
21-year member
UID 31210
Gender Male
Status Offline
Who knows the compression methods and data formats of MP3 files? Then it won't be a problem for me to play MP3, using an AC97 sound card
Floor 7 Posted 2004-09-15 00:00 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Here is an introduction about the format of MP3 files, but it's in English (I couldn't find the Chinese one):
http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html
However, some MP3 players under DOS are open - source, such as MPXPLAY. You can refer to the code for the decoding part of MP3 format files in it to complete, or directly copy some relevant code content in it (since it's completely open - source, there is no copyright issue). The source code of the latest version of MPXPLAY I have uploaded can be downloaded here:
Open the attachment
Note: Just now I went back to pure DOS and tried this WPLAY.EXE. It feels generally quite good, but it seems to only support 16 - bit WAV files and not 8 - bit WAV files (when playing 8 - bit WAV files, there are all noises).
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 8 Posted 2004-09-15 00:00 ·  中国 广东 深圳 南山区 电信
初级用户
Credits 158
Posts 23
Joined 2004-09-08 00:00
21-year member
UID 31210
Gender Male
Status Offline
Note: Just now I went back to pure DOS and tried this WPLAY.EXE. I feel that overall it's really not bad, but it seems that it only supports 16-bit WAV files and doesn't support 8-bit WAV files (there's noise when playing 8-bit WAV files). ========================================================The moderator is indeed the moderator, the test is really meticulous. The mono and 8-bit ones were indeed not written in. I will write the volume control and time display tonight, and then upload the source code. Let's all work together to make it more perfect.
Floor 9 Posted 2004-09-15 00:00 ·  中国 湖北 武汉 教育网
中级用户
Credits 258
Posts 49
Joined 2004-08-29 00:00
21-year member
UID 30951
Gender Male
Status Offline
I remember that when I was compiling this program, gotomsdos posted a message to pay tribute to me. Now thinking about it, I am really unworthy. Now we can pay tribute to brother rushon. After downloading this program, I love it so much. I spent half a day recording 16 kinds of sounds, which are combinations of 4 kinds of frequencies (8k, 11.025k, 22.05k, 44.1k), 2 kinds of channels (mono, stereo), and 2 kinds of bit depths (8-bit, 16-bit). The result is that only 1 combination can play normally, which is 44.1k + 16-bit + stereo. If I only reduce the frequency to 22.05k, or only reduce stereo to mono, I find that the playback speed is very fast, but I can still hear something. The other 13 combinations only hear a piece of noise, not that all 16-bit sounds are okay as Wengier said. During the running process, I found that the program can actually detect various frequencies and channel attributes of the file. Unfortunately, the frequency cannot be adjusted during playback, it's only 48khz. So I think that actually the playback at 44.1k is also not normal, it's just approximately normal. I hope the author will continue to work hard to solve these problems. I also hope the author will post the source code, so that everyone can study together. By the way, dear brother Wengier, why does the DOS window always pop up and disappear when I open the homepage of the union forum today? Is it for fun.
Floor 10 Posted 2004-09-15 00:00 ·  中国 广东 深圳 南山区 电信
初级用户
Credits 158
Posts 23
Joined 2004-09-08 00:00
21-year member
UID 31210
Gender Male
Status Offline
Thank you, your encouragement is the driving force for my progress. I will improve this program tonight to make it support more formats.
Floor 11 Posted 2004-09-15 00:00 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
mrdeadman: When did I say that only 16-bit sounds are acceptable?? My original words were "But it seems that it only supports 16-bit WAV files and does not support 8-bit WAV files", which means that while it can play some of the 16-bit sounds I have tested, it does not support 8-bit sounds, that is, it mainly emphasizes the fact that it currently does not support 8-bit sounds at all and hopes for improvement. Please don't misinterpret the meaning of this sentence as me saying that all 16-bit sounds can play completely normally! The phenomenon you mentioned "When I opened the union forum homepage today, a DOS window always popped up and disappeared in a flash" I didn't find, and it's definitely not "for fun".
rushon: I also pay my respects to you and wish you can improve the program smoothly!
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 12 Posted 2004-09-15 00:00 ·  中国 广东 深圳 联通
初级用户
Credits 158
Posts 23
Joined 2004-09-08 00:00
21-year member
UID 31210
Gender Male
Status Offline
You two brothers are too polite. Actually, I've been browsing the forum for a long time. Mainly because everyone has provided such good source codes.
Floor 13 Posted 2004-09-16 00:00 ·  中国 广东 深圳 联通
初级用户
Credits 158
Posts 23
Joined 2004-09-08 00:00
21-year member
UID 31210
Gender Male
Status Offline
Program upgrade: Program version V1.01 has added volume increase and decrease functions, and time display function: Problem: The problem about the unchangeable playback rate mentioned above, I have always not found a solution, and hope everyone can find it together. The source program is as follows: Suggestion: Hope everyone to maintain this program together, so that it can relatively maturely support wav, mp3, wma music formats, and can become a relatively mature FREE software. The next task is: Add some common functions, such as fast forward and rewind, loop playing a folder, friends who understand algorithms can add some sound effect processing: Solve the problem of only being able to play 48000 16 2. Decode mp3 function.
Floor 14 Posted 2004-09-16 00:00 ·  中国 广东 深圳 联通
初级用户
Credits 158
Posts 23
Joined 2004-09-08 00:00
21-year member
UID 31210
Gender Male
Status Offline
Open attachment

My program code is written rather messily, and I haven't developed the good habit of writing comments. Everyone, just take a look for now.
I hope that when we maintain this version in the future, it is necessary to develop such a good habit.
Hehe,
Floor 15 Posted 2004-09-16 00:00 ·  中国 广东 深圳 联通
初级用户
Credits 158
Posts 23
Joined 2004-09-08 00:00
21-year member
UID 31210
Gender Male
Status Offline
I downloaded this program and loved it. I spent half a day recording 16 kinds of sounds, which are combinations of 4 frequencies (8k, 11.025k, 22.05k, 44.1k), 2 channels (mono, stereo), and 2 bit depths (8-bit, 16-bit). The result is that only 1 combination can play normally, which is 44.1k + 16-bit + stereo. If I only reduce the frequency to 22.05k or only reduce stereo to mono, I find that the playback speed is very fast, but I can still make out some things. The other 13 combinations only hear a lot of noise, and it's not like what Wengier said that all 16-bit sounds work.
==================================================
It is hoped that you can upload the test examples you have, mainly the 4 combinations of 8, 16, mono and stereo channels. Let everyone study.
Forum Jump: