I'm developing with BASS.NET an AAC encoder to stream the output of my audio player directly to icecast.
No problems with the MP3 encoding and stream but AAC doesn't work. I'm using FAAC but trying other encoders the problem still the same.
Here's my portion of code
Dim aac As New EncoderFAAC(G_REC)
aac.InputFile = Nothing ' STDIN
aac.OutputFile = Nothing ' STDOUT
aac.FAAC_Bitrate = myStream(1).bitrate
Debug.WriteLine("ENCODER AAC: " + aac.Start(Nothing, IntPtr.Zero, False))
Stop
Dim icy2 As New ICEcast(aac)
icy2.ServerAddress = myStream(1).address
icy2.ServerPort = myStream(1).port
icy2.MountPoint = myStream(1).mountpoint
icy2.Password = myStream(1).password
icy2.PublicFlag = myStream(1).isPublic
icy2.StreamDescription = myStream(1).streamDescr
icy2.StreamGenre = myStream(1).streamGenre
icy2.StreamName = myStream(1).streamName
icy2.UpdateTitle(myStream(1).streamTitle, Nothing)
' use the BroadCast class to control streaming
_broadcast2 = New BroadCast(icy2)
_broadcast2.AutoReconnect = True
_broadcast2.ReconnectTimeout = 10
AddHandler _broadcast2.Notification, AddressOf OnBroadCast_Notification2
_broadcast2.AutoConnect()
G_REC is defined like this:
G_REC = Bass.BASS_RecordStart(48000, 2, BASSFlag.BASS_RECORD_PAUSE, 100, _myRecProc, IntPtr.Zero)
Thanks for your help!