Solved

Delphi Programming question

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

22 Experts available now in Live!

Get 1:1 Help Now