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 - Terry

#1
Hi,

After replacing the multimedia engine library, the program no longer experiences sudden interruptions. However, if I perform a stress test by continuously pressing the [Load] button, the program becomes unresponsive. This issue can be resolved through programming.

I will continue testing and will report any other issues. Thank you.

Terry
#2
Hi,

When the connection and playback are normal, it usually triggers enumPlayerEvents.EV_STREAM_CONNECTING and then continues with the callback. However, when the program crashes, after triggering enumPlayerEvents.EV_STREAM_CONNECTING, the program stops responding and does not proceed to the callback. It crashed immediately after not responding for a few seconds, preventing the call stack from being checked.




Hope this information helps.

Thank you.
Terry


#3
Hi,

http://220.135.102.142:8010/test

Sometimes it can connect and stream, sometimes it can't, and usually it suddenly crashes immediately. Please try several times.

Thank you.
Terry


#4
Hi,

I want to add that the Icecast server the program connects to does not use a playlist or mp3 file for streaming, but rather a stream similar to the following URL: http://ipaddress:8000/test

Thank you.
Terry
#5
Hi,

I used your sample program InternetRadio.exe to connect to a streaming server set up with Icecast2 and with a connection limit.

Connections and playback are normal within the connection limit, but if the program connects under the condition of being the last available connection, it usually sometimes connects and sometimes doesn't. More often, the program crashes immediately without any error message, leaving an Application Error 1000 kernelbase.dll error record in the Windows Event Viewer.

Is there a way to solve this?

Thank you.
Terry
#6
Hi,

There are two ways to send an audio stream to a streaming server. The sample project is one of them.
But it still needs to be attached to a Player and then output.
Is there any way to capture only the input audio source but not play output?

There is one more thing that I am confused about the WasapiMixAndClone sample project.
Why a control can initial more than 4 players? The three extra Players in the sample program seem to have no effect.

// init the DJ Studio control by instancing an adequate number of players:
// 2 for playing sound files from disk and 5 for attaching input devices
short nPlayers = 2 + 5;
nPlayers = m_audioDjAPI.InitSoundSystem(nPlayers, m_nWasapiDevice, m_nWasapiDevice, m_nWasapiDevice, 0);

Terry
Thank you
#7
Hi,

Is there any way to send an input audio device stream to a streaming server?

Terry
Thank you.
#8
Hi,

I tried to load a sound file from the website through the "m_audioAPI.LoadInternetStream(0,"http://localhost/test.mp3")" command.
When the playback is completed, the EV_DOWNLOAD_COMPLETE event will be triggered first, and then the EV_SOUND_DONE event will be triggered infinitely.

The execution logs is as follows

13:10:30.0695|[1]|[EV_SOUND_STOPPED]
13:10:30.1013|[1]|[EV_STREAM_CONNECTING]
13:10:30.3553|[1]|[EV_DOWNLOAD_BUFFERING] URL=http://localhost/test.mp3 STREAMING_BUFFERING
13:10:30.3678|[1]|[EV_STREAM_LOADED] STREAM_LOAD_OK http://localhost/test.mp3
13:10:30.3678|[1]|[EV_SOUND_PLAYING] URL=http://localhost/test.mp3
13:10:30.3678|[1]|[EV_DOWNLOAD_BUFFERING] URL=http://localhost/test.mp3 STREAMING_PLAYING
13:11:18.3746|[1]|[EV_DOWNLOAD_COMPLETE] URL=http://localhost/test.mp3
13:11:24.2355|[1]|[EV_SOUND_DONE] URL=http://localhost/test.mp3
13:11:24.2524|[1]|[EV_SOUND_DONE] URL=http://localhost/test.mp3
13:11:24.2685|[1]|[EV_SOUND_DONE] URL=http://localhost/test.mp3
13:11:24.2854|[1]|[EV_SOUND_DONE] URL=http://localhost/test.mp3
13:11:24.2854|[1]|[EV_SOUND_STOPPED] URL=http://localhost/test.mp3
13:11:24.2854|[1]|[EV_SOUND_DONE] URL=http://localhost/test.mp3
13:11:24.3026|[1]|[EV_SOUND_DONE] URL=http://localhost/test.mp3
13:11:24.3186|[1]|[EV_SOUND_DONE] URL=http://localhost/test.mp3
.
.
infinite loop


Is it normal ....?

Terry
#9
Hi,

Executing the 'PlayListStop' command will not trigger any events, right?

Kind Regards

Terry
#10
I was so careless, thank you.
#11
Hi,

I discovered that the AudioDjStudioApi cannot play audio files in a playlist within a command line program.
I modified the sample program "PlayerCmdLine" so that the program can load a directory containing audio source files and play them, but it seems to be unsuccessful. It can load a single audio file and play but a playlist. The program code is as follows. Is there anything I'm missing?



'---------------------------------------------------------------
Namespace PlayerCmdLine
   Friend Class Program
      Private Shared m_bSoundDone As Boolean = False
        Private Shared m_strInputPathname As String = ""
        Private Shared addrCallbackForPlayersEvents As CallbackForPlayersEvents = New CallbackForPlayersEvents(AddressOf PlayerCallback)
        Private Shared m_audioAPI As AudioDjStudioApi.AudioDjStudioApiObj = New AudioDjStudioApi.AudioDjStudioApiObj()


      Private Shared Sub PlayerCallback(ByVal nEvent As enumPlayerEvents, ByVal nPlayer As Int16, ByVal nData1 As Int32, ByVal nData2 As Int32, ByVal fData3 As Single, ByVal pBufferUnicode As IntPtr, ByVal nBufferLength As Int32)
         Select Case nEvent
            Case enumPlayerEvents.EV_SOUND_DONE
                    Console.WriteLine(Constants.vbCr & nEvent.ToString)
                    m_bSoundDone = True

                Case enumPlayerEvents.EV_SOUND_PLAYING
                    Console.WriteLine(Constants.vbCr & "Status: Sound playing...")

                Case enumPlayerEvents.EV_PLAYLIST_LOAD_DONE
                    Console.WriteLine(Constants.vbCr & nEvent.ToString)
                    If nData1 = 0 Then
                        Console.WriteLine(Constants.vbCr & "Error loading playlist")
                    End If
                Case enumPlayerEvents.EV_PLAYLIST_DONE
                    Console.WriteLine(Constants.vbCr & nEvent.ToString)

                Case enumPlayerEvents.EV_PLAYLIST_LOAD_STARTED
                    Console.WriteLine(Constants.vbCr & nEvent.ToString)

                Case Else
               Return
         End Select
      End Sub

      Shared Sub Main(ByVal args As String())
         If args Is Nothing Then
                Console.WriteLine("args is null") ' Check for null array
                Return
            End If
            ' read command line arguments
            Dim prefixes As String() = New String() {"/i:"}
            Dim cae As CmdArgExtractor = New CmdArgExtractor(prefixes, "/"c, ":"c)

            If (Not cae.ValidArgsPrefixes(args)) Then
                Return
            End If

            Dim my2dArr As String(,) = cae.GetArgsTwoDimArray(args)
            Dim i As Integer = 0
            Do While i < my2dArr.GetLength(1)
                Select Case my2dArr(0, i)
                    Case "i"
                        m_strInputPathname = my2dArr(1, i)
                End Select
                i += 1
            Loop
            Console.Clear()
            m_audioAPI.InitSoundSystem(1, 0, 0, 0, 0)
            m_audioAPI.CallbackForPlayersEventsSet(addrCallbackForPlayersEvents)
            m_audioAPI.DisplayVUMeter.Create(0, IntPtr.Zero)
            m_audioAPI.StreamVolumeLevelSet(0, 100, enumVolumeScales.SCALE_LINEAR)
            Dim err As enumErrorCodes
            Select Case True
                Case Directory.Exists(m_strInputPathname)
                    For Each file As String In Directory.GetFiles(m_strInputPathname)
                        err = m_audioAPI.PlayListAddItem(0, m_strInputPathname, 0)
                        Console.WriteLine("{0} {1}", file, err.ToString)
                    Next
                    Console.WriteLine(m_audioAPI.PlayListExecute(0, True).ToString)

                Case File.Exists(m_strInputPathname)
                    err = m_audioAPI.LoadSound(0, m_strInputPathname)
                    Console.WriteLine("{0} {1}", m_strInputPathname, err.ToString)
                    Console.WriteLine(m_audioAPI.PlaySound(0).ToString)

            End Select

            If m_audioAPI.LastError <> enumErrorCodes.ERR_NOERROR Then
                Console.WriteLine("Cannot load file due to error " & m_audioAPI.LastError.ToString)
            Else
                Dim info As ConsoleKeyInfo = New ConsoleKeyInfo()
                Do While Not Console.KeyAvailable
                    If m_bSoundDone Then
                        Exit Do
                    End If
                    Thread.Sleep(50)
                Loop
                m_audioAPI.StopSound(0)
                Console.WriteLine(Constants.vbCrLf & "Status: Stop")
            End If

            m_audioAPI.Dispose()
        End Sub
    End Class
End Namespace

'---------------------------------------------------------------

Terry
#12
Hi,

I got a brand new computer and made sure no other your component is running.
Problems occur if antivirus software (Windows 10 Microsoft Defender) is turned on, but sometimes the error will not appear after executing a few times.

If antivirus is turned off, it executes normally without any errors no matter how many times.

I really don't understand what this has to do with antivirus software.

Kind Regards

Terry

#13
Hello,

Yes, I modified the InternetStreams sample as below:

Sub Form1_Load
           ' init the control
            m_audioAPI.InitSoundSystem(4, 0, 0, 0, 0)


Sub PlayerCallback
      Case enumPlayerEvents.EV_STREAM_LOADED
                    'textBoxTags.Text = ""
                    'If nData1 = CInt(Fix(enumEventLoadStreamResults.STREAM_LOAD_OK)) Then
                    '    buttonPause.Enabled = True
                    '    buttonStop.Enabled = True
                    '    trackBarVolume.Enabled = True

                    '    m_audioAPI.PlaySound(0)
                    '    buttonPause.Text = "Pause"
                    'Else
                    '    MessageBox.Show("Invalid URL or stream currently not available: please, retry later")
                    'End If

                    'Stop playing streaming for now.


Private Sub radioButton80sBB_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles radioButton80sBB.CheckedChanged
     If radioButton80sBB.Checked Then
        m_audioAPI.LoadInternetStream(0, "http://www.multimediasoft.com/bins/80s.pls")
     End If
     m_audioAPI.LoadInternetStream(1, "http://www.multimediasoft.com/bins/70s.pls")
End Sub

Error occurs when radio "radioButton80sBB" button is clicked.

Terry

#14
Hi,

I continuously load Internet stream radio URL via 'LoadInternetStream' like                 m_audioAPI.LoadInternetStream(0, "http://www.multimediasoft.com/bins/80s.pls")           
m_audioAPI.LoadInternetStream(1, "http://www.multimediasoft.com/bins/70s.pls").

The following error message will appear "Internal error, cannot load engine Number 16 due to error 32"

The following is the execution log, the value in brackets is nPlayerIndex

12:35:41.8594|[PlayerCallback]-(0)-[EV_STREAM_CONNECTING          ]
12:35:41.8665|[PlayerCallback]-(1)-[EV_STREAM_CONNECTING          ]
12:35:43.3063|[PlayerCallback]-(1)-[EV_DOWNLOAD_BUFFERING         ] BUFFERING...
12:35:43.3226|[PlayerCallback]-(1)-[EV_STREAM_LOADED              ] http://www.multimediasoft.com/bins/70s.pls
12:35:43.3308|[PlayerCallback]-(1)-[EV_SOUND_PLAYING              ]

You can see that Player 0 is stuck at CONNECTING.

API Version is 11.2.0.0.

Thank You.

#15
Audio recording components / Re: bassenc_mp3.dll
March 17, 2023, 10:27:08 AM
Hi,

I find out that the newly compiled program cannot run with other programs which still use the old version of AudioSoundRecorderApiF4.dll together.
If do so, the error occurs.

Terry