MultiMedia Soft forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

SMF - Just Installed!

Author Topic: recorder starts but no vu and no elasped timer  (Read 4696 times)

ddonais

  • Newbie
  • *
  • Posts: 16
    • View Profile
recorder starts but no vu and no elasped timer
« on: January 09, 2015, 04:38:45 AM »

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?
Logged

Administrator

  • Administrator
  • Full Member
  • *****
  • Posts: 231
    • View Profile
    • MultiMedia Soft
Re: recorder starts but no vu and no elasped timer
« Reply #1 on: January 09, 2015, 09:56:41 AM »

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
Logged

ddonais

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: recorder starts but no vu and no elasped timer
« Reply #2 on: January 13, 2015, 12:09:24 AM »

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.

Code: [Select]
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

Code: [Select]
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
« Last Edit: January 13, 2015, 12:15:10 AM by ddonais »
Logged

ddonais

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: recorder starts but no vu and no elasped timer
« Reply #3 on: January 13, 2015, 12:30:24 AM »

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

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

ddonais

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: recorder starts but no vu and no elasped timer
« Reply #4 on: January 13, 2015, 07:35:29 AM »

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

Administrator

  • Administrator
  • Full Member
  • *****
  • Posts: 231
    • View Profile
    • MultiMedia Soft
Re: recorder starts but no vu and no elasped timer
« Reply #5 on: January 13, 2015, 10:41:00 AM »

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
Logged

ddonais

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: recorder starts but no vu and no elasped timer
« Reply #6 on: January 14, 2015, 11:55:01 PM »

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.
Logged

Administrator

  • Administrator
  • Full Member
  • *****
  • Posts: 231
    • View Profile
    • MultiMedia Soft
Re: recorder starts but no vu and no elasped timer
« Reply #7 on: January 15, 2015, 12:01:55 AM »

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
Logged

ddonais

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: recorder starts but no vu and no elasped timer
« Reply #8 on: January 15, 2015, 12:52:44 AM »

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

Administrator

  • Administrator
  • Full Member
  • *****
  • Posts: 231
    • View Profile
    • MultiMedia Soft
Re: recorder starts but no vu and no elasped timer
« Reply #9 on: January 15, 2015, 11:32:03 AM »

Hello,

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

Kind regards

Severino Delaurenti
MultiMedia Soft
Logged

ddonais

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: recorder starts but no vu and no elasped timer
« Reply #10 on: January 16, 2015, 12:48:47 AM »

Thank you, I found the error of my ways.

Logged