News:

SMF - Just Installed!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - ddonais

#1
Audio recording components / Re: vu meter display
January 18, 2015, 06:34:43 PM
Ok so it only happens if I put the vu meters inside of another container, like a groupbox or a panel
#2
Audio recording components / Re: vu meter display
January 18, 2015, 05:33:54 PM
It is the same user control that I sent you the other day.
#3
Audio recording components / Re: vu meter display
January 18, 2015, 03:47:13 AM
find attached 2 links to images the first one is of the form while designing

https://www.dropbox.com/s/sy6mzswacssd1i4/formdesign.png?dl=0

2nd one is of the form while running (as you can see the vu meters are shifted to the left and up a bit

https://www.dropbox.com/s/v6x1ba8cpo741ie/running.png?dl=0

Thanks
Daryll
#4
Audio recording components / vu meter display
January 18, 2015, 03:28:48 AM
for some reason my vu meter location changes from my form design to when i run my application, it gets moved to the left and up.

is this normal?

I have used the same vu meters as in basic example, except for I have resized them
#5
That solution worked like a charm!!
#6
ah ok I understand now thank you very much.
#7
so should I set it to Synchronous mode
#8
Ok I have added a flag, however if I do the following, it starts the recording again before the recordingstopped handler has run (in the code to change encoding parameters flag must be set to true again so that it will autostart after the setrange runs out)

flag = false
audiosoundrecorder1.stop()
code to change encoding parameters
audiosoundrecorder1.start()

Private Sub AudioSoundRecorder1_RecordingStopped(sender As Object, e As RecordingStoppedEventArgs) Handles AudioSoundRecorder1.RecordingStopped
    If not flag then
       exit sub
    else
        code for restarting recording
    end if
End Sub
#9
is there a way to tell if the recording was stopped because of the
AudioRecorder1.Stop()
or from say a AudioSoundRecorder1.SetRecordingRange timeout

I Want to do things differently depending on which event it was.
#10
Thank you, I found the error of my ways.

#11
I sent you a PM with a link and explanation in it.  Can you use that?
#12
Is there an email I can send the sample project to?

I have made a usercontrol, and a main application.

I will provide both projects.
#13
I am going to make a sample vbproj for you to look at.
#14
the startfeed sub is being called from another class within the project.

and that seems to be where the problem is coming from.
#15
Here are my 2 different but the same routines for starting a recording session.  the one named  setupFeedInstances works and is run on program startup
the 2nd one named startfeed where I pass it all of the info basically just like the first routine and it doesn't start it.

setupFeedInstances gets it's info from a mysql database.
the function that calls startfeed stores the info that it sends to startfeed into the same mysql database.

now if I restart the program, the setupFeedInstances gets the info from the mysql database that was stored there from the sub that called startfeed, and then it works.

I think I am confusing you :p

I am wondering if it has something to do with it being in a shared sub.


Public Sub setupFeedInstances()

        Dim odr As New DataSet
        odr = db_read("SELECT * FROM `feeds`")
        For Each dr In odr.Tables(0).Rows
            Dim feedInstance = New STLogger.Logger

            Dim audioDeviceID As Integer
            Dim foundRows() As Data.DataRow
            foundRows = audioDevices.Select("device Like '" & dr("feedDevice").ToString & "'")

            For Each row As DataRow In foundRows
                audioDeviceID = row.Item(0)
            Next

            With feedInstance
                .Location = New Point(39, (13 + (feeds.Count * 160)))
                .folder = My.Settings.DefaultDirectory & "\"
                .station = dr("feedName").ToString()
                .deviceIndex = audioDeviceID
                .duration = dr("feedDuration")
                .recFormat = dr("feedAudioFormat").ToString()
                .recQuality = dr("feedQuality")
                .silenceThreshold = dr("silenceThreshold")
                .silenceMinLength = dr("silenceMinLength")
                .silenceDetect = dr("feedSilence")
            End With

            feeds.Add(dr("feedName").ToString(), feedInstance)
            _Logger.Controls.Add(feeds(dr("feedName").ToString()))
            feedInstance.setup()
            If dr("feedDuration") > 0 Then
                feedInstance.recStart()
            End If

        Next
        odr.Dispose()
    End Sub


Public Shared Sub startfeed(ByVal feed As streamParameters)
        Dim feedInstance = New STLogger.Logger

        With feedInstance
            .Location = feed.Location
            .folder = feed.folder
            .station = feed.station
            .deviceIndex = feed.deviceIndex
            .duration = feed.duration
            .recFormat = feed.recFormat
            .recQuality = feed.recQuality
            .silenceThreshold = feed.silenceThreshold
            .silenceMinLength = feed.silenceMinLength
            .silenceDetect = feed.silenceDetect
        End With

        Main.feeds.Add(feed.station, feedInstance)
        Main._Logger.Controls.Add(Main.feeds(feed.station))
        feedInstance.setup()
        If feed.duration > 0 Then
                feedInstance.recStart()
            End If
    End Sub