Solved

how to play music file in Pascal?

Posted on 1998-08-01
3
846 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Kind of encoding 3 427
Delphi Skype API 2 1,824
Problems in integrating VCL & FireMonkey via a FM DLL 4 616
proper way to parse url in delphi 2 242
This article describes how to reset your Windows 10 password when you've forgotten it.
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

808 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