More control over sound functions...

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
jeslar360
User
User
Posts: 20
Joined: Thu Aug 28, 2008 6:24 am

More control over sound functions...

Post by jeslar360 »

PauseSound(#Sound)

GetSoundPos(#Sound) - Tell the position of the PLAY pointer, in milliseconds

SetSoundPos(#Sound, {POSITION}) - Set the Play Pointer to the {POSITION} by millisecond

PlaySoundPart(#Sound, {STARTPOS}, {ENDPOS}) - Play the sound from StartPos to EndPos (in milliseconds), if is EndPos not defined, play til end of sound.

Would also like to see some recording and encoding/transcoding functions...
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: More control over sound functions...

Post by blueznl »

I think there's not even something like SoundLength() is there? :(
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: More control over sound functions...

Post by c4s »

This gets requested over and over since several years. To mention just a few: With IsPlaying() obviously being the most requested one. Seriously, sometimes you should listen a little more to our requests. Sure there tons of them but look at it, this gets constantly requested for over 10 years!
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: More control over sound functions...

Post by Shield »

I wonder why the community doesn't do this on its own...?
If you guys need additional functionality...just write your own libraries and share it with the
rest if you like. You're all programmers. Be intuitive. :)
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: More control over sound functions...

Post by Polo »

Shield wrote:I wonder why the community doesn't do this on its own...?
If you guys need additional functionality...just write your own libraries and share it with the
rest if you like. You're all programmers. Be intuitive. :)
I must say Purebasic Sound library is very limited - though I support the fact someone could try to build a new one, if it's good and cross platform, probably Fred & freak will implement it in Purebasic and everybody will be happy :)
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: More control over sound functions...

Post by MachineCode »

Shield wrote:I wonder why the community doesn't do this on its own...?
Because we shouldn't have to. The fact that we do, is beside the point.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: More control over sound functions...

Post by Shield »

Well, the first priority of developing a programming language like PureBasic is to create
a stable compiler and a good set of language specific things ("keywords", general syntax).

Built-in functions are nothing more than "nice to have", they can be implemented by users of the compiler.
MachineCode wrote:Because we shouldn't have to.
The only thing we shouldn't have to do is worrying about compiler related bugs.
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: More control over sound functions...

Post by blueznl »

Well, I do agree. It's not the most important part, but with all the good core functionality and all the graphic updates the few remaining lacks start to become more and more... euh... 'audible' :-)

Writing your own sound functions is all good, but it's not *easy* and involves some serious programming, which typically goes beyound regular use of a *basic* language, at least, IMHO etc.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply