Solved

Song wont Play

Posted on 2002-04-24
1
167 Views
Last Modified: 2010-04-04
Hello ALL
I am writing A DLL
and have problem with the procedure below
It wont play the song...


///////////////////////// CODE  ////
Procedure CREATE;
         Var
         CHAN : HSTREAM;
       
Begin
Chan:=0;
 BASS_StreamFree(chan);
    chan := BASS_StreamCreateFile(FALSE, 'C:\charlie rich - the most beautiful girl', 0,0,0);
    BASS_StreamPlay(chan, FALSE, BASS_SAMPLE_LOOP);
     end;

//////
AS you can see the song is in C:\
the error message i get for this is

uncompatible type String and Pointer.

But this same code works in a normal delphi app
but not from My DLL
Thanks in advance Dinkleburger
0
Comment
Question by:Dinkleburger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 6

Accepted Solution

by:
DrDelphi earned 50 total points
ID: 6966188
I am completely unfamiliar with the BASS_StreamCreateFile routine, but given the error message that you are getting, I am going to guess that the song title parameter should be PChar. Try this:


chan := BASS_StreamCreateFile(FALSE,PChar('C:\charlie rich - the most beautiful girl'), 0,0,0);



Good luck!!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
find a node in VST 2 93
How to define IfThen functions in one common unit? 4 80
firemonkey Android Listview Sort items 7 111
Formating a integer number to float 2 10
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

710 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