[Gambas-user] Wave generator

Fabien Bodard gambas.fr at ...626...
Mon Feb 10 09:43:23 CET 2014


Really buggy...

First don't use ValueBox but simle textbox as it is just to display
value (ReadOnly, align right)

the i can't get it playing... $hplayer.play can't set staus...
(Benoit's example run here... so)


What is the need of :
Public Sub QuitGWG()

  $hPlayer.Close
  FMain.Close
End


Just put it in Form_Close()

You can call Form_Close() every where even from the menu event, it's a
regular sub.


Public Sub MainMenuSub1_Click()

 Form_Close

End

Public Sub Form_Close()

  $hPlayer.Close
  FMain.Close

End

Prefer the use of an internal variable for the current frequency
value... Use the Widget at less at possible for storing data.


Private $fCurFrequency as float


... Well as this think code is better than explanation sometime...
this is your code reviewed, feel free to ask questions if you have
because there is many things corrected.

We are always happy to meet new gambas users ... And we know that
learning new language concept are difficult even if gambas try to keep
all as more simple as it can do.





2014-02-10 8:58 GMT+01:00 Dominique Michel <dominique.michel at ...3298...>:
> Le Mon, 10 Feb 2014 00:04:44 +0100,
> Dominique Michel <dominique.michel at ...3298...> a écrit :
>
>> Le Sun, 9 Feb 2014 17:24:05 +0100,
>> Tobias Boege <taboege at ...626...> a écrit :
>>
>> > On Sun, 09 Feb 2014, Dominique Michel wrote:
>> > > I made some changes to the Wave generator.
>> > >
>> > > A screen shoot is better than a long explanation:
>> > > http://postimg.org/image/7kbr04d31/
>> > >
>> > > I tested it with both the alsasink and the jackaudiosink, but I
>> > > didn't made a menu for that, because I don't know how to test if a
>> > > sink exist without to load it. And when it try to load a non
>> > > existing sink, it just crash. Instead, it is a comment in the
>> > > source.
>> > >
>> > > The jack sink is the one that work best of the two I tested. It
>> > > give less parasitic noises than with the alsasink.
>> > >
>> > > The cursor buttons are coupled with value boxes. The frequency
>> > > corsor work just great, but it is a glitch with the volume cursor.
>> > > When entering a value in the volume value box, the cursor move too
>> > > much to the left. It is at the right exactly at 0 dB, but it reach
>> > > the left side at -40 dB, when this setting is calibrated at -60
>> > > dB. And that strange because it work just fine when moving the
>> > > cursor.
>> > >
>> > > The sources archive is about 21 kb and I want to share it, that
>> > > both for you and for review. It is my first Basic program from a
>> > > very long time ago... So, where is the best place to put that
>> > > archive?
>> > >
>> >
>> > No problem to send it to the list if it's less than... 256 KiB? I
>> > don't know the limit anymore.
>>
>> OK, here it is. The alsasink is the default sink.
>
> A new version. It add a Quit function and some comments.
>
>>
>> >
>> > Regards,
>> > Tobi
>> >
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
Fabien Bodard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WaveGenerator-3.5.93.tar.gz
Type: application/x-gzip
Size: 22102 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20140210/0f4def62/attachment.bin>


More information about the User mailing list