Solved

Delphi Programming question

Posted on 1997-08-28
4
154 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

685 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