topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 5:30 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Need some help with VB5  (Read 5117 times)

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Need some help with VB5
« on: December 30, 2006, 03:13 PM »
I need some help with getting simultaneous sounds to play and I can't make it work.
« Last Edit: December 08, 2009, 07:12 PM by CodeTRUCKER »

Veign

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 993
    • View Profile
    • Veign - Where design meets development
    • Donate to Member
Re: Need some help with VB5
« Reply #1 on: December 30, 2006, 03:54 PM »
VB5 does not support multithreading.  Visual Basic is an apartment threaded environment and to get even something close to multithreaded* would not be for the faint at heart.

* - You could create an ActiveX EXE which would run in its own process space but you would need to use some sort of callbacks if this will run async.  This too may be too complex for ya.

Whether a computer can handle somthing or not is not the question.  The question / answer is whether the development environment or devloper can handle it.

(does a computer play sounds ontop of each other?  If I run Winamp and Media Player only one can play their sound at a time)


CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Need some help with VB5
« Reply #2 on: December 30, 2006, 04:06 PM »
Alright, I have limitations I was not anticipating, but I have to do something.  The user has to depend on hearing the sounds fast, sharp and clear.  What would you suggest? 
« Last Edit: December 08, 2009, 07:14 PM by CodeTRUCKER »

Veign

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 993
    • View Profile
    • Veign - Where design meets development
    • Donate to Member
Re: Need some help with VB5
« Reply #3 on: December 30, 2006, 04:09 PM »
Keep it short and let it finish.

Visual Basic can do a lot but making it do certain things is just not worth the effort.  True multithreading is one of those things.

In fact all of my applications had been written in VB6 - not too shabby.

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Need some help with VB5
« Reply #4 on: December 30, 2006, 04:40 PM »
Ok... I'll see what I can do to match these shortcomings.  Thanks for the help, though! :Thmbsup:
« Last Edit: December 08, 2009, 07:15 PM by CodeTRUCKER »

Ruffnekk

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 332
  • Uhm yeah...
    • View Profile
    • RuffNekk's Crypto Pages
    • Donate to Member
Re: Need some help with VB5
« Reply #5 on: January 16, 2007, 02:19 PM »
I think I know the answer to this Farmsteader, but I'm at home now and I have some old code at work that will do the trick if I remember correctly. Do you still want it? I can post it later tomorrow.
Regards,
RuffNekk

Programming is an art form that fights back.

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Need some help with VB5
« Reply #6 on: January 16, 2007, 02:23 PM »
Sure, anything I can get would be helpful.  Thanks!
« Last Edit: December 08, 2009, 07:10 PM by CodeTRUCKER »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Need some help with VB5
« Reply #7 on: January 16, 2007, 04:56 PM »
Shouldn't be necessary to do threading to have multiple sounds playing at once, anyway. Not sure if PlaySound (in async mode) will do it, but you should be able to use DirectSound from VB if all else fails...

Veign: which OS do you use? And which sound card? Ever since win2k, multiple apps have been able to do sound at once (and have windows/drivers mix it) for me :)
- carpe noctem