Recently I've been looking at all the fancy sound features BYOND provides, but I've been a little confused - it seems there's no way to know whether a sound is still playing for a user or not. This little thing interferes with all of my grand plans, so I was wondering if it WAS somehow possible, otherwise I'll just have to settle for something else.
Thanks in advance!
ID:273497
Jun 24 2010, 10:45 pm
|
|
In response to Karffebon
|
|
Karffebon wrote:
you can easily code something to know if it playing or not. Yeah, I thought about that option, but it's really not all that ideal considering the volume of songs I was going to add, plus the possibility of interrupting a song and coming back to it. Thanks for the input though, at least. |
Yeah, it's a problem. Not quite possible AFAIK.
Something you could do is use a DLL to grab the duration of audio files on the local (host) computer. This way you don't have to hardcode every file's duration... |
In response to Kaioken
|
|
Oh? I'm not familiar with combining dll files and BYOND, how would one do that? That said, this is purely for interest's sake, since I have decided on an easier path than my original intention anyway.
|
In response to Perpetr8r the Perpetu8r
|
|
It's done using call()() to call an external function from a library (DLL/SO). Of course, you need to first create (or otherwise obtain) the DLL, which requires using a suitable language and compiler.
|
In response to Kaioken
|
|
I see. So say I create a dll with some custom-built functions in it. How would I use call to call those functions, and how would I get the dll to return data that DM could read?
Edit: Never mind, I checked through the release notes until I found it. Thanks for the tips! |
crate a var isplayying"songname" for each song, when it
starts make it 1
sleep(songnamelenght in seconds*10)
if(ispalyingsongname==1)
isplayingsongname=0
this is very simple, you can implement this a lot if you want to make a player, but this will be much more code.
like if you want to stop songs you'll have to make a var to stop the check for it's song, and so. you could also do this system with while. idk.