none
Sending a WAV file over the USB port using VB 2008? RRS feed

  • Question

  • Hi all, pretty new to programming with Visual Studio 2008 - did all my learning writing progs for DOS based applications when you could access 'The Metal' and do real things with the PC.

     

    As you can see I used to control things with my PC but got disulussioned with the advent of Win 2000, XP etc coming along.

     

    Cut to the chase.....quite simply I need to write an application that will send a WAV file over a USB port to a remote piece of hardware that I have designed that will store the file and play it back through a DAC.

     

    Questions:    Will VB 2008 be able to do the job?

    Will I need libraries written to handle the USB port that arn't supported by Microshaft?

    Will I need to write a descriptor file for the PC end of the USB i/f?

     

     

     

     

    Any help would be much appreciated

     

    Chris

    Sunday, March 16, 2008 8:58 PM

Answers

  •  

    Chris,

     

    The design of this application really wouldn't be much different now, from the glory DOS days, if anything, it would be easier.

     

    Communication over USB, which differs from the DOS days because you access the USB port via the USB driver.

     

    Assuming that the device on the other end of the USB can correctly read and decode, and ultimately play the WAV file, then you should be good to go.

     

    From what I know about these sorts of things, there should be a generic windows driver for the USB port, and that should be all that you'd need.  It's more I think about the format that the device expects the wav file, and making sure that the send end matches with what is expected by the device.

     

    I hope this helps you a little?

     

    Martin Platt.

    Monday, March 17, 2008 12:49 AM
  • Chris,

     

    Yeah, I read into that.  I also used to program in C, and C++ in the past, using interupts and the like.  The difference now is that the driver does that stuff for you, which is nice, if a little less satisfying!

     

    I'd imagine that the Win32 forums might help, there might also be a driver development forum, which might have people who know a lot about the drivers, and hence could be questioned to find what you need to know?

     

    Perhaps you could mark this post as helpful if you found it so?

     

    Good luck with the developments, and if there's anything else I can help you with, please post again!

     

    Martin Platt.

    Monday, March 17, 2008 10:25 PM

All replies

  •  

    Chris,

     

    The design of this application really wouldn't be much different now, from the glory DOS days, if anything, it would be easier.

     

    Communication over USB, which differs from the DOS days because you access the USB port via the USB driver.

     

    Assuming that the device on the other end of the USB can correctly read and decode, and ultimately play the WAV file, then you should be good to go.

     

    From what I know about these sorts of things, there should be a generic windows driver for the USB port, and that should be all that you'd need.  It's more I think about the format that the device expects the wav file, and making sure that the send end matches with what is expected by the device.

     

    I hope this helps you a little?

     

    Martin Platt.

    Monday, March 17, 2008 12:49 AM
  • That is exactly what I want to hear Martin, thank you very much for your time. I shall look into this a little more. I used to write in C a lot as I said using an old Borland C  editor / compiler for DOS and it was really easy to look up libraries and find the function you needed to do something, plus you could access the DOS and MSDOS intrerrupt services which was really usefull.

     

    What bugs me is how you find the libraries and functions in them in these Microsoft libraruies...I am just thinking maybe there will be some info in the MSDN libraries - havnt got around to looking in there yet!

     

    Anyway, many thanks again Martin, if I have any other queries I will post them at this forum,

     

    Cheers

     

    Chrisd

     

    Monday, March 17, 2008 9:33 PM
  • Chris,

     

    Yeah, I read into that.  I also used to program in C, and C++ in the past, using interupts and the like.  The difference now is that the driver does that stuff for you, which is nice, if a little less satisfying!

     

    I'd imagine that the Win32 forums might help, there might also be a driver development forum, which might have people who know a lot about the drivers, and hence could be questioned to find what you need to know?

     

    Perhaps you could mark this post as helpful if you found it so?

     

    Good luck with the developments, and if there's anything else I can help you with, please post again!

     

    Martin Platt.

    Monday, March 17, 2008 10:25 PM
  •  

    I was wondering how you would write the code in Visual Basic 2008 to recognize that the usb is connected and then to take the data from the usb and read it? thanks
    Friday, January 23, 2009 11:46 PM