Is it possible to play 8 different and individual mono wave files to a 7.1 (8 channels) audio system using vb.net? (I undestand that the .1 speaker is the subwoofer and I'm not yet sure it can be replaced with an ordinary speaker.) The playing should start simultaneously and the files can be of different size/length.Is this something that should be done using win API functions if it can be accomplished at all.I just re-installed my old VB6 which I need to ugrade and vb.net would be the easiest for me so I placed this Q here.
Based on a thread earlier today, and in particular an answer that Cor gave wherein he pointed to this article, I thought that I'd do some investigation. Many times here the question has come up about playing .mp3 audio files and NOT using the Windows Media Player object. In the article referenced above, he shows how this can be done via DirectX.
I've looked at DirectX before and it seemed ambiguous so I never really dug into it but it turns out to be pretty simple actually! I thought that I'd write this as a step-by-step of what I did so that maybe some of you will find use from it. The whole thing stems around using DirectX and to begin with, you'll need to download and install the SDK for it. If you haven't already,
try this link. Do be aware that it's a large download (about a half gig)! Once that's installed, create a form and add a reference to the class that we need for this. You can do this several ways, but the way I usually do is to right-click on the name in the Solution Explorer, then choose "Add Reference":
This is tied in with the other discussion that I started last week about playing audio files using the DirectX classes. If you haven't yet had a look at that other thread,Using the same reference as in the audio application, let's set up a form for video this time. I started with a form that I then placed a split container on and in the lower panel of the split contatiner, I placed the buttons and other controls. Following is how I have mine set up:
Reread the thread on the audio player because the methods are very similar - in fact some are identical! However, this is video and it got a bit more involved as you might expect.The full code is here and I hope you'll find it useful to you. Following is a screenshot of the end result.
I am working on an application in VB.net (.NET 2.0) where I need to open a dynamic amount of different audio streams. Normally, for audio files, one would suggest importing the Windows Media Player COM reference and adding a GUI-based element from the toolbox, but since I'll be working with a dynamic amount of these a GUI would be a terrible idea (especially with Tab stops).
im new to VB and i would like to ask some questions;Im developing a Media Study Room program and i have this little problem, My problem is that, how can i designate the video in the list box, that when i click variable on the list, it will automatically play the video i designated to a number and its description in the bottom will appear.
We have code in our former VB6 application, that ported fine to VB.NET, that plays a simple AVI file of the typical "flying folders" and "spinning maginfying glass" AVI. Under Windows XP, our application ran fine and everything was good.
Then we had customers start using Vista and Win7 and this stuff crashes. We were using the MS Common Controls (SP4) and then (SP6) - utilizing the Animation player. Now - these dont work and we get nasty errors.
I searched Microsoft and the web to answer the "what now?" question and though there are numerous suggestions, none of them work. We cant use Media Player because we dont want any menu - just the graphic. We dont know why, with the cool tools given in .NET, there is no animation player (seems a huge oversight...) But we need to get "unstuck" on this one, and we need that fast...
So, How does on play a simple AVI file using VB.NET code? What DLL or OCX does Microsoft recommend and is there a place we can find some sample code for it?
I'm trying to write a virtual piano program. Each key plays a sound from the resources directory.How do i play two(or more) sounds at the same time if ex two keys are pressed. Or start playing another sound while one is still playing.
Been doing VB2010 for about a year now, have recently started to push the boundary's for what kind of media I can incorporate into my forms. I haven't been able to play .wav or .mp3 files though. I have tried to follow tutorials on microsoft and other coding websites without success.
I'm trying to make a "Simon" game with four buttons labeled 1-4. The game is supposed to read the numbers out loud, but i have a problem with that. I have 4 wav files from google text-to-speech, each named 1-4. I made an number generator that can return like this "42331", and the game is supposed to play 4.wav, 2.wav, 3.wav, 3.wav and 1.wav.
Here's what I got so far. Public Class Form1 Dim rnd As New Random Dim i = 0 Dim level As Integer = 5 Dim nums As String [code] ..... It only plays 1.wav (the last in the sequence).
I have a program that speaks wave files. This works problemless with the Soundplayer class with the following code:
Sub MyPlayWav(ByVal WavFileName As String, ByVal StartPos As Long, ByVal EndPos As Long) Dim wp as new SoundPlayer wp.SoundLocation = WavFileName wp.Play End sub
The soundplayer does however not seem to have a method to play the wave from position StartPos to position EndPos and achieving just that would mean quite a reduction in downloads of these files.
The soundplayer does have a stream object, and that does have a seek method, suggesting that there might be a way to accomplish this, but how?
I plan to include other media files as I am developping the project, and I guess I will be confronted with the same problem.
I am having a _ton_ of issues, and I am hoping some of you could clear it up...
1. OK So a while back someone showed me an example for fonts from resources, but I noticed if you close the window that it opens, The entire program shuts down... what can I do to fix it?Also, The fonts are not showing up on all computers, only this one....
2. I am trying to delete a image file, which the program downloads from the internet, and can change regularly, but when I try to delete it will not delete. It says its in use, and I cant figure out where.
3. I am trying to play videos using the following
vb Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer Const WS_CHILD As Integer = &H40000000
[code]....
Now, I have confirmed the files it is attempting to play are in fact valid video files. It refuses to play all but the last one.
i recently downloaded a demo game "Delta Force Xtreme 2 BETA". the game it's self, looks like vb3 does when compared to vb.net 2oo8.. one thing about it, on the startup screen, it plays a decent track of music..
i want to record that sound, in wav format, i guess, directly from my speakers. i googled all day, hoping to learn something about playing/recording sound, and i got nowhere.. so i finally decided to post here, after searching the forum for answers, again, without any luck..
i'm not looking for links to sites that the code is not tested before the link is posted.
just a form with 3 buttons. 1 to record, 2 to stop and save, and 3 to play. again, the sound should be recorded directly from the speakers.
A simple class that plays a tone of varying ampliture, frequency and duration through the PC's speakers:
Imports System.IO Imports System.Media Public Class Form1 Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Beep.Beep(1000, 1000, 1000)
[Code]...
This class uses SoundPlayer.PlaySync which has a 4 MB stream length limit, so the longest duration is 24000 milliseconds. You can try SoundPlayer.Play for longer durations, but allow plenty of time for it to complete.
there are many C# things for this but I DONT KNOW C#, this link has FOUR C# PROJECTS - when it is posted in this forum:[URL]..it is ticking me off that all of the volume control i can find is in, yet again, C#!
please help, i NEED something to mute/unmute mic on button click and speakers on button click
i know how to record the sound coming from my mic using MCISendString~ Is there a way to record the sound from the speakers? Like if my computer beeps i hear a beep on the recording? Or if i play music?
I am thinking of giving mono develop a try. I have some questions. Visual Studio 2008 Professional has options for creating controls and services. This is not available in Visual Basic 2008 Express. This relationship between the different editions, is there something limiting like this with mono develop? I figure since it's open source, everything is implemented like Visual Studio 2008 Pro.
Another question. Does anyone have experience with mono. Is it a production level serious environment for commercial work? Is there something I should know about it?
Any mono developer that has anything good or bad to say, please drop a post in here. I would like to get as much info as possible from vbforums. This has always been the best help site for me using Visual Basic Express.
The most important thing, to reiterate is if I can make Windows Services with Mono Develop and if it supports full threading features that are limited or not available in express.
As a last question, what is the story on managed directx for mono. On Linux, there is no such thing, so would you plan an opengl library to start with? or does that work out in a different way?
I've heard a lot about Mono but I have no idea what exactly it is or how to use it. All I know is it's aimed at making .NET apps cross platform. Could someone tell me or point me to some tutorials explaining how to port my vb code to run on other operating systems? Maybe shed some light on all of this?
I started a new solution (with multiple projects) and am trying to get it to build. Initially I was getting an internal compiler error and thought maybe it had to do with MySql, so I removed all references to MySql. Now I am getting the error "Could not find a 'Sub Main' in ''". I have made sure that all of my projects have a Main subroutine like this:Public Shared Sub Main()End Sub2 out of the 7 projects will compile. I don't know what makes these projects different from the others, and the error message isn't very helpful. Any experience with this one?
When i run program Error Shows...Could not load file or assembly 'Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
Description: HTTP 500. Error processing request.
Stack Trace:System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. File name: 'Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
I've downloaded latest source from mono project, compiled it and everything works (c# projects, mod_mono, xsp) except vb.net. Vbnc, mono's vb.net compiler does not exist after compiling mono from source.This is on CentOS 5, on Ubuntu 10.04 I installed mono packages via apt-get and vb.net just works.
I read many questions on running .net code with mono but i always end up with the same question. I'm building a new app right now, so i better start straight and take the good direction: Can i develop an app within Visual C# Express or Visual Basic Express, compile it from the Microsoft environment using the compilers they have and run that application using MONO on linux.Or do i have to work with the mono compiler from scratch (or convert my MS project afterwards to mono) to be able to use my .net apps using the Mono framework on linux.Linux/Mac support is not really a must for my app development, but i'd like to get it straight off the start.i'm using WinForms, Encryption, Globalization, SQLClient but thats probably all, is there anything you Mono experts out can tell me NOT to use off the start.Oh and i use the My namespace for all sorts of things such as getting the computer name, logged on user name, resources, settings, etc...
Someone asked me today if it was possible to port a visual basic application to Linux or similar platform, I assumed it was .NET so I suggested to use Mono, but noticed that on their vb support page they only talk about vb 8 (.NET) Does mono support non-.NET vb? In fact I'm not sure what he is using, I think vb6, I'm not sure of the versioning at all though.
To do some testing with MPIR, GMP, the .Net Bigint module and other math libraries I've recently written a small program which allows me to create random sequences of numbers with a certain amount of precision: Always this amount of digits in front and behind the comma, no starting/ending zeroes. While it might not be the most elegant of code, it really blew my mind when I found out my application was running up to 10 times faster with Mono under Ubuntu 10.10.While the code is not elegant and in Basic, it was developed by me in about an hour's work and it serves the purpose: To generate dependable huge datasets consisting solely of preconfigured numbers before or after the comma. To get a general idea the UI's posted here:[code]Eliminating IO by not writing to IO but just to a List instead Eliminating an "if" path which checks if the random before/after float character is checked.Disabled progress reporting in general which causes the backgroundworker to not report any progress.Play around with the amount of symbols, theres very little difference between just getting 1 random character or getting 15 per record.I'm at a loss to what causes my program to run so slow under Windows/.Net compared to Ubuntu/Mono. I'm only a "half programmer", which means: I'm a Bussiness and ICT student who mainly focusses on human ICT, and the Microsoft Platforms certainly have lead on that, however such a huge performance hit compared to Linux for this soul and simple program really gives me a cold chill when it comes to my favourite platform.
I am exposing some ISO C++ data types to .Net (mono on Linux to be precise).For the purpose of brevity, I shall refer to C# in my question, although my question relates to all of the .Net languages (with C# and VB.Net being my target languages). So far, I have worked out how to expose the ISO C++ data types in C# class(es) for use in mono -The only problem so far is how to deal with the C++ callbacks. In .Net languages (C# and Vb.Net), I believe 'delegates' are the callback equivalent.
Sticking with C# for now, can anyone recommend a way that I can register the C# delegate functions with my ISO C++ code.The ISO C++ code is a notification library, and I want to be able to "push" the notifications to the mono framework (i.e. C# delegates in this case).My underlying assumption is that the mechanism/steps to implement this would be the same for the .Net languages - I'll just have to code the actual delegates in the .Net language of choice - is that assumption correct?Last but not the least, is the question of thread saftey. The underlying ISO C++ code that I am exposing to .Net (mono to be more specific), is both re-ntrant and thread safe - do I have to do anything "extra" to call .Net delegate from my ISO C++ code?
After rewriting a VB.NET assembly with Mono.Cecil the 'Call Stack' debugging window in Visual Studio 2010 shows the language as C# and not VB.NET. Is it possible configure Mono.Cecil to rewrite an assembly so the debugger recognises the rewritten assembly as VB.NET?The following Mono.Cecil simply reads and saves an assembly without modification. However, the debugger reads the new assembly as C# instead of VB.NET.
Dim readerParameters = New ReaderParameters() With {.ReadSymbols = True} Dim writerParameters = New WriterParameters() With {.WriteSymbols = True}
[code]....
It is desirable for the rewritten assembly to be VB.NET so the debugging windows 'Local' and 'Immediate Window' are the VB.NET versions rather than the C# versions.