Author |
Topic: API calls for Sound and Video (Read 2840 times) |
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: API calls for Sound and Video
« Reply #15 on: Oct 15th, 2009, 08:22am » |
|
Quote:| My immediate wish was just to load a series of pseudo-system sounds - my own audio recordings, typically less than 100kBy each |
|
Definitely sounds like a case where the simplest code is the best:
Code:wave$ = @dir$+"yourfile.wav"
SYS "PlaySound", wave$, 0, &20001 The Help documentation is arguably misleading because it implies that if you want to play a sound multiple times you should load it into memory first. That's unnecessary for short files like yours because Windows will do a good job of 'cacheing' the files in memory anyway.
So simply repeating the above code should be absolutely fine.
Richard.
|
|
Logged
|
|
|
|
Malcolm
Guest
|
 |
Re: API calls for Sound and Video
« Reply #16 on: Feb 28th, 2010, 03:12am » |
|
The AudioPlayerPlus has been updated and partially recoded.
This removes the methods that Richard was objecting to but is still based on MCI, which is an old set of Windows API's which will one day go away. In this application it uses the file extensions to select which device to open so no extension, no play.
This version has the slider for track positioning suggested by Simon only it has been made quite a bit more slick. (and bigger target) I also made the counter up/down switch act like Windows Media player, i.e. just click on the numbers to change mode.
Otherwise it does what it always did, be a small window that you can drop audio files onto and play them. If you drop a folder onto the window it will extract any audio files in there. (Can't go into nested folders though).
You can even drop files or a folder onto a link or shortcut which will fire up the player and play the contents. The files can be played randomly, repeatedly and stuff like that. No playlists because I don't like them. And sometimes things that you initially don't "get" are great bits of music.
Plays whatever you have codecs for. MP3, Wav, WMA, MIDI and mpegs, cda, and CDs either as a whole or by track and so on. This is still a fresh version so there are likely to be some minor issues.
http://tech.groups.yahoo.com/group/bb4w/files/%22Temp%20Folder%22/AudioPlayerPlus3_02.exe
|
|
Logged
|
|
|
|
Malcolm
Guest
|
 |
Re: API calls for Sound and Video
« Reply #17 on: Feb 28th, 2010, 3:37pm » |
|
OK So I wrote: Quote:| No playlists because I don't like them. |
|
If anyone wants these I could probably be persuaded to recognize M3U. If there is any interest then let me know.
|
|
Logged
|
|
|
|
81RED
Guest
|
 |
Re: API calls for Sound and Video
« Reply #18 on: Feb 28th, 2010, 3:41pm » |
|
In case I have not said so already: Fantastic job Malcolm. 
If I'm allowed just one more minor suggestion, then it would be to change the sensitivity of the mouse scrollwheel volume adjustment - as it is right now, it takes nine full "twiddles" of my finger to go from one extreme to the other, and that feels a bit too much like an exercise if you ask me.
|
|
Logged
|
|
|
|
Malcolm
Guest
|
 |
Re: API calls for Sound and Video
« Reply #19 on: Feb 28th, 2010, 4:07pm » |
|
Scroll sensitivity....
Yes, I suppose I agree with that comment. I am sure we can crank that up.
Thanks for your comments and I am glad you like it.
|
|
Logged
|
|
|
|
Malcolm
Guest
|
 |
Re: API calls for Sound and Video
« Reply #20 on: Mar 1st, 2010, 12:45am » |
|
Here is your wish Simon, the scroll is 7 times faster so you should be done within two twiddles at most.
It appeared that M3U style Playlists were popular and they are a simple format so it was pretty easy to allow them to be dropped or opened just like individual music files. Don't forget that relative paths can be used in Playlists stored with the music files. I have to freeze this project very soon.
http://tech.groups.yahoo.com/group/bb4w/files/%22Temp%20Folder%22/AudioPlayerPlus3_03.exe
|
|
Logged
|
|
|
|
81RED
Guest
|
 |
Re: API calls for Sound and Video
« Reply #21 on: Mar 2nd, 2010, 11:04am » |
|
Thank you Malcolm, that made a world of difference.
|
|
Logged
|
|
|
|
Malcolm
Guest
|
 |
Re: API calls for Sound and Video
« Reply #22 on: Mar 13th, 2010, 2:56pm » |
|
AudioPlayerPlus now in Sound_Music folder with source.
This appears to be stable.
http://tech.groups.yahoo.com/group/bb4w/files/Sound-Music/AudioPlayer/AudioPlayerPlus3_1.exe
I have added PLS playlists to the MU3, otherwise it is the same old basic small footprint music player. For those who don't want large applications constantly trolling the internet trying to sell you music, here is a solution.
|
|
Logged
|
|
|
|
|