中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-13 02:02
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS媒体世界 & 网络技术 (多媒体室) » I rewrote a program that can play WAV sounds using wws.c, everyone test it
Printable Version  3,607 / 21
Floor1 rushon Posted 2004-09-14 00:00
初级用户 Posts 23 Credits 158
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.
Floor2 rushon Posted 2004-09-15 00:00
初级用户 Posts 23 Credits 158
The file format is incorrect or it cannot be empty
==============================
??? Why does this error always occur? Moderator?
Floor3 Wengier Posted 2004-09-15 00:00
系统支持 Posts 10,521 Credits 27,736
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)
Floor4 rushon Posted 2004-09-15 00:00
初级用户 Posts 23 Credits 158
Just play it directly.
Floor5 rushon Posted 2004-09-15 00:00
初级用户 Posts 23 Credits 158
Open attachment

It is to directly use the functions in wws.c to play sound
Floor6 rushon Posted 2004-09-15 00:00
初级用户 Posts 23 Credits 158
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
Floor7 Wengier Posted 2004-09-15 00:00
系统支持 Posts 10,521 Credits 27,736
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).
Floor8 rushon Posted 2004-09-15 00:00
初级用户 Posts 23 Credits 158
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.
Floor9 mrdeadman Posted 2004-09-15 00:00
中级用户 Posts 49 Credits 258
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.
Floor10 rushon Posted 2004-09-15 00:00
初级用户 Posts 23 Credits 158
Thank you, your encouragement is the driving force for my progress. I will improve this program tonight to make it support more formats.
Floor11 Wengier Posted 2004-09-15 00:00
系统支持 Posts 10,521 Credits 27,736
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!
Floor12 rushon Posted 2004-09-15 00:00
初级用户 Posts 23 Credits 158
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.
Floor13 rushon Posted 2004-09-16 00:00
初级用户 Posts 23 Credits 158
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.
Floor14 rushon Posted 2004-09-16 00:00
初级用户 Posts 23 Credits 158
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,
Floor15 rushon Posted 2004-09-16 00:00
初级用户 Posts 23 Credits 158
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.
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023