Solved

Delphi Programming question

Posted on 1997-08-28
4
152 Views
Last Modified: 2010-04-06
I wish to play a MIDI file from memory, not from a file.
If you know a way to do it in Delphi1 it'd be appriciated.
0
Comment
Question by:nir_l
  • 2
4 Comments
 
LVL 3

Expert Comment

by:mirek071497
ID: 1342888
do you need load to streams some files and then play or you need create MIDI in memory ?
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1342889
Hi nir_1,

Have a look at this site, maybe there is something you need :

www.compulink.co.uk/~greenstone/midisoft.htm

Have fun,
c.u. ZifNab,
0
 

Author Comment

by:nir_l
ID: 1342890
I wish to be able to play a MIDI file that is in a memory stream. I have a compo to add files into my final .EXE. I can use the files as streams in my program. The problem is that I can't play a MIDI if it isn't a physical disk file, unlike the
command SndPlaysound which can also get a memory block as input... am I clear enough?
0
 
LVL 3

Accepted Solution

by:
mirek071497 earned 90 total points
ID: 1342891
Sorry for the long time.

If you need only play from memory then this is easy

EXAMPLE:
var m : TMemoryStream;
begin
  m := TMemoryStream.Create;
  m.LoadFromFile( 'D:\TEST.WAV' );
  sndPlaySound( m.Memory, SND_MEMORY );
  m.Free;
end;
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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 …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now