recorder starts but no vu and no elasped timer

Started by ddonais, January 09, 2015, 04:38:45 AM

Previous topic - Next topic

ddonais

i create multiple recorder sessions dynamically based on entries in a mysql database. and also when someone adds a new entry to the database it should automatically create the recorder session and start recording.

everything works great on startup when fetching the entries in the mysql database and the sessions start recording with vu and elapsed time counter.

however if someone adds a new entry it creates the recording session and starts recording, but the vu's don't start and the elapsed timer doesn't start.

if the program is restarted and it loads the previously entered entry from the database everything works normal.

Just wondering if anyone has had problems with the vu and elasped timers in the past?

Administrator

Hello,

we never received feedback about this sort of problem in the past but it's quite difficult guessing what could be wrong without looking at the code being used when a new recording session is created dynamically as you described: if you could send us a small project replicating the problem or at least replicating the code used to create the new "entry", we could be certainly of help in identifying any possible issue inside your code.

Kind Regards

Severino Delaurenti

ddonais

#2
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

ddonais

the startfeed sub is being called from another class within the project.

and that seems to be where the problem is coming from.

ddonais

I am going to make a sample vbproj for you to look at.

Administrator

Hello,

unfortunately your code snippets don't bring much light because I cannot see any calls to methods of the component: in any case, if not already done, I would strongly suggest to get the return codes from various calls to the recorder component's methods: in case of error they may return an error code (negative values) that could be of interest in order to understand the real nature of the issue.

Kind Regards

Severino Delaurenti
MultiMedia Soft

ddonais

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.

Administrator

Hello,

I've sent an e-mail to your account: you can send your project by replying that message.

Kind Regards

Severino Delaurenti
MultiMedia Soft

ddonais

I sent you a PM with a link and explanation in it.  Can you use that?

Administrator

Hello,

I've sent the solution of the issue to your mailbox.

Kind regards

Severino Delaurenti
MultiMedia Soft

ddonais