Burn a simple Audio CD with NeroCOM and VB6

vbimport

#1

Always if i add a song to the AudioTrack i get from NeroCom the Message:The fileformat is not supported (filename)
I use the Flag NERO_AUDIO_TRACK_FILE_MP3 for normal mp3-files and NERO_AUDIO_TRACK_FILE_WAV for normal wav files. If i burn the same files with Nero 6.0 it works, but not with the NeroCom. What is the Problem?

Set AudioTracks = New NeroAudioTracks
Set AudioTrack = New NeroAudioTrack
AudioTrack.FileName = “01.mp3”
AudioTrack.Index0ContainsData = False
AudioTrack.Artist = “Artist”
AudioTrack.Title = “Titel”
AudioTrack.TrackType = NERO_AUDIO_TRACK_FILE_MP3
AudioTracks.Add AudioTrack

Ndrive.BurnIsoAudioCD ArtistStr, TitleStr, 0, Nothing, AudioTracks, Nothing, NERO_BURN_FLAG_CD_TEXT + NERO_BURN_FLAG_WRITE, Speed, NERO_MEDIA_CD


#2

Do you get a run-time error or is it a message from OnAddLogLine event?

Have you tried using the full path to the MP3 file?


#3

It´s a Error message from nerodrive.burnisoaudiocd, the adding to the AudioTrack and audioTracks is ok.
Shure, i use the full pathname. Is the pathname wrong, the Error message is : “wrong path or filename (filename)”


#4

Does this error happen with any MP3 you try it with or just with some particular ones?


#5

It happens with each kind of file, .wav, .mp3 … also each type of mp3, i mean with constant bitrate 128k and ID3V1 Tag also with all other formats. If i burn this files (wav and mp3) with Nero 6.0, then accept nero this files. If i want to burn this files with NeroCom i get always the message: unsupported file format.

I can burn with NeroCom ISO-Cd’s and import Imagefiles etc. all works, only with Audio-CD’s it dos’nt work. Can someone copy a part of the code, where it works? (equal the language, c++, VB6 i understand all…)


#6

@papaengel

Here you are:

Private Sub AudioBurn()
Dim drives As INeroDrives
Set drives = nero.GetDrives(NERO_MEDIA_CDR)
Set drive = drives(AvailableDevices.ListIndex)
Dim MusicTrack As NeroAudioTrack
Dim list As NeroAudioTracks
Set list = New NeroAudioTracks
Dim File As NeroFile
Dim Filename As String
Dim TrackName As String, ArtistName As String, TitleName As String
On Error GoTo Audio_handle_error

For i = 1 To lstFiles.ListItems.Count
    If lstFiles.ListItems(i).Checked Then
        Filename = lstFiles.ListItems(i).SubItems(1) 'ListView
        Set MusicTrack = New NeroAudioTrack
        MusicTrack.Filename = Filename
        
        TrackName = NameFromPath(Filename)
        TrackName = Left(TrackName, Len(TrackName) - 4)
        X = InStr(TrackName, " - ")
        If X > 0 Then
           ArtistName = Trim(Left(TrackName, X - 1))
           TitleName = Trim(Mid(TrackName, X + 3))
        Else
           ArtistName = Artist.Text
           TitleName = TrackName
        End If
        MusicTrack.Artist = ArtistName
        MusicTrack.Title = TitleName
        If InStr(Filename, ".mp3") > 0 Then
           MusicTrack.TrackType = NERO_AUDIO_TRACK_FILE_MP3
        ElseIf InStr(Filename, ".wav") > 0 Then
           MusicTrack.TrackType = NERO_AUDIO_TRACK_FILE_WAV
        ElseIf InStr(Filename, ".wma") > 0 Then
           MusicTrack.TrackType = NERO_AUDIO_TRACK_FILE_WMA
        End If
        list.Add MusicTrack
    End If
Next i

OpStart = Timer
If Simulate.Value = 0 Then  'CeckBox "Simulate"
    drive.BurnIsoAudioCD Artist.Text, Titel.Text, 0, Nothing, list, Nothing, NERO_BURN_FLAG_BUF_UNDERRUN_PROT + NERO_BURN_FLAG_CD_TEXT + NERO_BURN_FLAG_DETECT_NON_EMPTY_CDRW + NERO_BURN_FLAG_WRITE + NERO_BURN_FLAG_DAO, BurnSpeed, NERO_MEDIA_CD
Else
    drive.BurnIsoAudioCD Artist.Text, Titel.Text, 0, Nothing, list, Nothing, NERO_BURN_FLAG_BUF_UNDERRUN_PROT + NERO_BURN_FLAG_CD_TEXT + NERO_BURN_FLAG_DETECT_NON_EMPTY_CDRW + NERO_BURN_FLAG_SIMULATE + NERO_BURN_FLAG_WRITE + NERO_BURN_FLAG_DAO, BurnSpeed, NERO_MEDIA_CD
End If

Exit Sub

Audio_handle_error:
strMessages = strMessages + Err.Description + Chr(13) + Chr(10) + nero.LastError
MoniTxt = strMessages
MoniTxt.SelStart = Len(strMessages)
End Sub

I hope it helpes


#7

Thanks for ur help,

but it dos#nt works, like my code… I get always from OnAddLogLine a NERO_TEXT_FILE Error: File format is not supported

Equal if i use wma, wav, mp3-files… But all the files are burnable with nero 6.0

Can someone help me or tell me, what happens? Supports nerocom only a special kind of wav? (i use 44.100 Samplerate, stereo / mp3 Lame encoder with default-switches.) :bow:


#8

Can you please try burning a single audio file to an audio cd with NeroCMD and see how that goes? Did you try reinstalling Nero?


#9

The same problem with nerocmd:

C:\PROGRA~1\AHEAD\NERO>nerocmd --drivename e --write --audio c:\01.wav
The file format is not supported.
(c:\01.wav)

Burn process failed!
NeroAPI reports: The file format is not supported.
(c:\01.wav).

And now? If i burn this file in nero it works…