Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, September 10, 2007 3:16:58 AM(UTC)
anandhavelu

Groups: Registered
Posts: 3


I am using ltmmConvertCtrl to convert mp3/PCM data to audio in avi.
The application hangs at the getSample call to samplesource object after a fixed number of audio samples are got and delivered
In my comp it hangs at 16 or 17

Find below the part of code in which error occurs

 While (True)
            Dim frameHeader As MP3FRAMEHEADER
            FileGet(fno, frameHeader)
            If (Not (frameHeader.byte1 = &HFF And (frameHeader.byte2 And &HF0) = &HF0)) Then
                'Assuming only tag is at end of file .fixed bit rate sample rate.
                sampleSource.DeliverEndOfStream(1, 1000)
                GoTo exitloop
            End If
            If (Not ((frameHeader.byte3 And &HF0) = &H90)) Then
                MsgBox("VBR file")
                GoTo exitloop

            End If
            Dim padding As Integer
            padding = 0
            If ((frameHeader.byte3 And &H2) = &H2) Then
                padding = 1
            End If
            stoptime = starttime + 1152 * (10000000.0# / 44100.0#)
            sample = sampleSource.GetSampleBuffer(1, 1000)
            Dim samplesize As Integer = 417 - 4 + padding
            sample.ActualDataLength = samplesize
            Dim mp3audiodata(samplesize - 1) As Byte
            FileGet(fno, mp3audiodata)
            sample.SetData(samplesize, mp3audiodata)
            sample.SetTime(HighLong(starttime), LowLong(starttime), HighLong(stoptime), LowLong(stoptime))
            sampleSource.DeliverSample(1, 1000, sample)
            sample = Nothing
            starttime = stoptime

        End While


Does anyone know why this occurs or how to fix it?
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, September 11, 2007 12:32:39 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)


Did you try the AudioReplace
demo that ships with our toolkit? If not, you can find it in the following folder:


Examples\ltmm\VB\AudioReplace


If the demo works, but your own project doesn't, try
to begin from a clean copy of the demo and modify it gradually to do what you want.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.076 seconds.