Solved

how to play music file in Pascal?

Posted on 1998-08-01
3
839 Views
Last Modified: 2010-05-18
1)how to play xm file in pascal? (better if in background)
please send me the sources of units by e-mail: slava_a@actor.ru

2) the same, concerning wav and mid files.

thanks!
0
Comment
Question by:slava_a
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
omsec earned 100 total points
ID: 1217245
Hello there...

To the first question, I'm sorry, you can't play XM (Fast Tracker II) Files in Pascal. Since XM is a very complex Audio Format it needs to run in 32bit Protected Mode. Turbo Pascal is a real Mode compiler anyway and Borland Pascal supports only 16bit Platform. The only one 32bit Pascal Compiler for DOS is called FPK Pascal, it's be most powerfullst beside some others student projects, but for these compilers are no sound enginges avaiable yet, since FPK is not 100% compatible to TP/BP.

If you wish to play Tracker Modules in background, which is a good idea, I recommend to use the MIDAS Digital Sound System and
play either MOD (ProTracker), S3M (Scream Stracker II) or Streams. Get MIDAS from http://www.s2.org/midas

WAV is are un-compressed raw data for the audio card, so if you want music for about 5 mins, these files would be huge (if you play'em at CD-Quality which is 44.1KHz, 16bit, ST there is 172KB Data for a Second (!)) And the MIDI thing, remember that MIDI sounds worse under 16bit DOS, there is no good comparison to Windows MIDI Players. But if you need WAV or MIDI Routines (note MIDI is hard to find for Pascal) you can let me know, I will see, if I have some source in my archive :)

greets, Roger
0
 
LVL 2

Expert Comment

by:omsec
ID: 1217246
sorry a thing I forgot to mention is, the only one case when you CAN play an XM - File using a 16bit Platform like TP/BP is if you are playing in on a GUS (Gravis Ultra Sound Card), since these cards are different from the SB (Sound Blaster) standard.
Note, MIDAS v0.40a is the highest version you can use under TP/BP because they do not support 16bit Compilers anymore in higher versions. Another possibility (but quite difficiult, I duno exactly how) is to use the Borland Delphi 3 CMD-Compiler to make 32bit executable for DOS...
0
 
LVL 1

Expert Comment

by:ichen
ID: 1217247
i have a WAV player Program in PASCAL.. if you want you can send me email to cool17@geocities.com
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Google always has something new and amazing up its sleeve, and the most current thing that they have been working on is another step in the evolution of Google Search, from machine learning to its brilliant successor, deep learning.
Adding Computers to AD groups through an SCCM Task Sequence
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question