MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

MooglyGuy
Renegade MAME Dev
Reged: 09/01/05
Posts: 2258
Send PM
Re: How do i use util::wav_open and wav_close?
12/14/22 11:28 PM


> > > How am i supposed to close that file?
> >
> > By being able to look at the existing code that uses those functions.
> I guess it's a blessing being smart like you!!!
> Problem is no one uses the wav_close function. They all flush everything when mame
> closes.
> Thanks for your AWESOME help.

It really is a blessing being smart like me.

Because I'm smart, I can read, and I can code. Because I can read, I can see that on line 28 in wavwrite.h, there is a line that says:


Code:


using wav_file_ptr = std::unique_ptr;



Because I can code, I can tell that an asterisk - * - is the "pointer" operator in C and C++, and so the most likely scenario is that "wave_file_ptr" is what I should be using in stead of "wave_file *".

And since I'm still able to read, I can go and look up the shitload of information that exists about std::unique_ptr. And since I can read that information, I can understand that I should be calling .reset() on the wave_file_ptr, and that trying to call wave_close manually is a stupid thing to do, and trying to do so would indicate that I'm a complete idiot - like you - who can neither read, nor code.

Stick to what you're good at. I don't know what you're good at - maybe ditch digging, or mopping floors - but whatever it is, it certainly isn't reading, or coding. Not when you're completely incapable of understanding straightforward compiler errors, and your first reaction is "It must be everyone else who is wrong".







Entire thread
Subject Posted by Posted on
* How do i use util::wav_open and wav_close? Parduz 12/12/22 04:53 PM
. * Re: How do i use util::wav_open and wav_close? MooglyGuy  12/14/22 05:51 AM
. * Re: How do i use util::wav_open and wav_close? Parduz  12/14/22 07:11 PM
. * Re: How do i use util::wav_open and wav_close? MooglyGuy  12/14/22 11:28 PM
. * Re: How do i use util::wav_open and wav_close? Parduz  12/15/22 12:11 AM
. * Re: How do i use util::wav_open and wav_close? Vas Crabb  12/15/22 09:47 AM
. * Re: How do i use util::wav_open and wav_close? Parduz  12/15/22 10:45 AM
. * Re: How do i use util::wav_open and wav_close? Vas Crabb  12/15/22 03:46 PM
. * Re: How do i use util::wav_open and wav_close? Parduz  12/15/22 05:23 PM

Extra information Permissions
Moderator:  Pi 
0 registered and 33 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 230