Sound problems with visual basic program

Questions about Wine on Linux
Locked
fargodwe

Sound problems with visual basic program

Post by fargodwe »

I installed the current release as I have had a sound problem and *hoped* it might fix it. I'm not sure if this is a problem in wine directly, a dll or more likely something I am missing.

The scenario:

I created a program using Visual Basic from Visual Studio Express 2008 - so it's an old version of Visual Basic. I created a 32-bit prefix with windows xp and it didn't work. I tried 64-bit but I think the program would only try to run in 32-bit.

This program "speaks" via a routine from Visual Basic that I only use but don't understand.

The program works in Windows 10 64-bit, but when I click on the option in my program to "turn on" sound it flat out just stops and the desktop shows again.

So: do I even stand a chance of getting whatever this old sound "stuff" working in Wine? Is it possible there is some dll I have not installed (I did add the vb runtime dll)?

Thanks for any input!
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: Sound problems with visual basic program

Post by DarkShadow44 »

Without logs, I have no clue.
fargodwe

Re: Sound problems with visual basic program

Post by fargodwe »

How do I generate logs? I tried winedbg and no errors are kicked out after the program actually starts.

Thank you!
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: Sound problems with visual basic program

Post by DarkShadow44 »

See the FAQ.
fargodwe

Re: Sound problems with visual basic program

Post by fargodwe »

Judging from the log file and the code that triggers the error, I think the problem is that SAPI is not implemented - or perhaps not installed - in wine. I am very inexperienced with wine so ANY help is appreciated.

2 attached files:

the offending code

the log file

EDIT: The file attachments didn't work. It is giving me an error of "The extension txt is not allowed". This the extension of the log file from the FAQ for generating the log file. I tried renaming both files to a suffix of ".dat" and doesn't like that either. The FAQ for generating the log file said wine my.exe &> log.txt. So I followed the FAQ but I can't post the results.

EDIT2: I seem to remember something about not being able to upload files until you have a certain "score" on the forum - is that what is going on? I am pretty sure that it needs SAPI runtime installed in the given wine prefix but I have no idea how to do that.
User avatar
dimesio
Moderator
Moderator
Posts: 13205
Joined: Tue Mar 25, 2008 10:30 pm

Re: Sound problems with visual basic program

Post by dimesio »

fargodwe wrote:EDIT2: I seem to remember something about not being able to upload files until you have a certain "score" on the forum - is that what is going on?
No; there is no such restriction. Rename the file without any extension. There is a size limit on uploads, so if a file is very big, upload it somewhere else and post a link.
I am pretty sure that it needs SAPI runtime installed in the given wine prefix but I have no idea how to do that.
Install it with winetricks speechsdk.
fargodwe

Re: Sound problems with visual basic program

Post by fargodwe »

Same problem even with that installed. I tried no file extension on the log and the piece of code that generates the error and I still get "The extension is not allowed" when I select the file and click "Add the file".
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: Sound problems with visual basic program

Post by DarkShadow44 »

Make it into a zip file? Also, if you want, you can also share the program itself with us, makes testing easier.
fargodwe

Re: Sound problems with visual basic program

Post by fargodwe »

Ok, I'll try again. I zipped the log file, then zipped then entire folder needed to run the application. At the time I generated everything on Windows I didn't realize I'd have a little problem with special characters in the file name. The unzipped folder "Bingo!!" needs to be put in the 'Program Files (x86)' folder. The executable is in the folder itself but all the sub folders etc are needed. The source for the entire project is in the "Let's Play BINGO!!/Let's Play BINGO!!/GameStatus.vb' file. The offending section is the TELL_BALL function. Please forgive my horrible naming of everything and the code - I'm just a rookie a VB.
fargodwe

Re: Sound problems with visual basic program

Post by fargodwe »

I'm sorry - it's accepting the file name but doesn't appear to actually be uploading it. I probably don't know how to do it.
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: Sound problems with visual basic program

Post by DarkShadow44 »

Well, you uploaded something, but the zip is empty.
fargodwe

Re: Sound problems with visual basic program

Post by fargodwe »

I think I've got it now - sorry - I didn't know how to zip files. The program requires several subfolders to run so the zip file ended up being too large. All I could do was include the code snippet that causes the error and the log file. If there is another way to get everything up I would be glad to do so as it's just a program I wrote for gpl release.
User avatar
dimesio
Moderator
Moderator
Posts: 13205
Joined: Tue Mar 25, 2008 10:30 pm

Re: Sound problems with visual basic program

Post by dimesio »

If it's too big to upload here, upload it somewhere else, such as Google Drive, and post a link here.
fargodwe

Re: Sound problems with visual basic program

Post by fargodwe »

On - I'll work on that tonight as that is also something I haven't done before. I'll repost with the info once I get that figured out and done.
fargodwe

Re: Sound problems with visual basic program

Post by fargodwe »

I think I finally have this set up right - at least I hope so.

the zip file contents need to be put in the Program Files (x86) directory on the drive_c of a 32-bit wine prefix. If not, it won't run.

I the code that causes the problem has been placed in a separate file and the log file is a separate file all within the zip file.

https://drive.google.com/file/d/1wALCJ7 ... sp=sharing
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: Sound problems with visual basic program

Post by DarkShadow44 »

fargodwe wrote:the zip file contents need to be put in the Program Files (x86) directory on the drive_c of a 32-bit wine prefix. If not, it won't run.
Uh, but a 32bit WINEPREFIX doesn't have a "Program Files (x86)" folder?

But I got it to work:
- Create 32bit prefix
- Put contents from zip into "C:\Program Files (x86)" (you need to create that folder)
- winetricks -q dotnet30 speechsdk
- Profit
fargodwe

Re: Sound problems with visual basic program

Post by fargodwe »

The Program Files (x86) was where Windows 10 installed it so I hard coded it in the program - I've been too lazy to create an installer that asks for the installation folder and then changed the program to know where it is installed. Sorry about that!

THANK YOU SO MUCH!!!!

When the previous install of soundsdk and still no sound I was worried. Adding dotnet30 seems to have done the trick!!

Now I don't have to swap drives in my laptop to my Windows 10 disk when I go downstairs to call Bingo!

On a side note, what did you think of the program? After selecting a game you can turn on sound (which now WORKS thanks to you!!) and you can turn on autoplay and set the delay between balls. Clicking new ball once and it goes automatically. I live in a seniors apartment complex and we have Bingo each Thursday. I was tired of listening to a bunch of balls rattling around in a cage so I wrote this. Not a very good programmer but it works.

And......if anyone wants it it's free!!

THANK YOU AGAIN SO MUCH!!!
Locked