Your Digital Media Has Never Looked So Good

 
Chewy
Topic Author
Posts: 25
Joined: Sun Feb 20, 2005 9:54 pm
Location: Near Denver

FLAC on Sonica

Sat Oct 08, 2005 8:25 am

- What version of firmware are you on
- Are you using the latest version of Sonica
- Latest version of FLAC codec (or at least 0.7)
- Do you have a mixture of songs i.e. MP3 and FLAC
- How many songs did Sonica find
- Do you have a Rev A or Rev B
- Are you using a swap file
- Could you paste the last few lines of the debug messages you are getting.


- FW 2.35
- Sonica 4.6
- FLAC .7
- Songs are mostly WAV, a couple of MP3s and a few FLACs (recent addition)
- PB is Rev B
- Don't usually use a swap file
- Sonica finds 2096 records, when the PB is in a clean state the last few lines appear as follows:
Writing song info for Classical / English Renaissance Music / The Earle of Oxford's Marche
Writing song info for Classical / English Renaissance Music / The Bells
Finished writing database file (2096 records)
Done writing files to database
Sorting main song queue.

If I even try to play a FLAC song Sonica exits before completing a scan and the last few lines of the debug.txt are as follows:
Writing song info for New Age / Ray Lynch / Clouds Below Your Knees
Writing song info for New Age / Ray Lynch / Rhythm In The Pews
Writing song info for New Age / Ray Lynch / Pastorale
Writing playlist Tasha's Party to db

Usually when I get twisted around from trying to play a FLAC in Sonica the PB requires a reboot. Even after a reboot, Sonica exits with the above debug.txt. Deleting the .sonica_song.DB allows Sonica to load correctly again.

I will try some tests with the swap file enabled and see if there is any difference.

Thanks,
--Chewy
 
soiaf
Posts: 785
Joined: Fri Jan 14, 2005 5:19 am

Sat Oct 08, 2005 8:53 am

I don't think a swap file will be needed, I've got more files than that and Sonica happily handles it (I have a Rev B also).

So, assuming you've removed the database file, can you start it again and wait until its finished scanning and then try playing some music?
 
Chewy
Topic Author
Posts: 25
Joined: Sun Feb 20, 2005 9:54 pm
Location: Near Denver

Sat Oct 08, 2005 9:37 am

I have taken a step back and have removed all the FLAC files and deleted the database file (after a PB reboot). When I start the application it exits. So I have run the application with debug turned on and here are the results:

1st time
-Sonica exits and the debug file shows "Writing playlist Tasha's Party to db" on the last line and there is no more info.

2nd time
Sonica stays up and running and the debug file shows
"Finished writing database file (2092 records)
Done writing files to database
Sorting main song queue.
"
When I queue up multiple .WAV songs and use Sonata, it works as advertised.

Now here's the interesting part: When I have any FLAC files on the disk and I select a couple of .WAV files to play, the PB locks up after I jump to the 2nd song in the queue (it continues to play, but I loose control over the PB). This is where the problem happens in the debug.txt file:
Queue not initialized, getting initial value
poping song 0
Popped song Who Do You Love from queue
Now Playing: /mnt/smb/buffalo1/music/Rock/Doors Live/In Concert/01-Who Do You Love.wav
Song duration: 250
Player: Queuing stream of type WAV (16778540)
Loading default image
Buffering 0 of 4 filled for stream 1
Buffering 1 of 4 filled for stream 1
Buffering 2 of 4 filled for stream 1
Buffering 3 of 4 filled for stream 1
Buffering 4 of 4 filled for stream 1
Audio playback started for stream 1
AudioPlayback end, close stream for id 1.
Result = kPlaybackStopped (1)
Player: Workaround encountered, trying to stop player.
poping song 1
Popped song When The Music's Over from queue
Now Playing: /mnt/smb/buffalo1/music/Rock/Doors Live/In Concert/04-When The Music's Over.wav
Song duration: 9
Player: Queuing stream of type WAV (16778540)
Loading default image
Buffering 0 of 4 filled for stream 2
Buffering 1 of 4 filled for stream 2
Buffering 2 of 4 filled for stream 2
Buffering 3 of 4 filled for stream 2
Buffering 4 of 4 filled for stream 2
Audio playback started for stream 2


During the above debug text the Roku is locked and I had to do a reset. Let me know if there are some other tests that I should try.

Thanks.
 
soiaf
Posts: 785
Joined: Fri Jan 14, 2005 5:19 am

Sat Oct 08, 2005 10:19 am

Well something is definitely wrong there!
The song durations are meant to be in milliseconds, so its safe to say that something is getting the system quite messed up.

There is one test I'd like you to do, can you delete the database and make a directory with just the FLAC files and make Sonica just scan them?
If this also causes a problem then we have a smaller set of circumstances to check.

Thanks for trying these tests out.
 
Chewy
Topic Author
Posts: 25
Joined: Sun Feb 20, 2005 9:54 pm
Location: Near Denver

Sat Oct 08, 2005 11:28 am

Sure, your test makes perfect sense! I will get back to you later today.
 
Chewy
Topic Author
Posts: 25
Joined: Sun Feb 20, 2005 9:54 pm
Location: Near Denver

Sat Oct 08, 2005 6:32 pm

I tried creating a new share that only contains FLAC music on it, and disconnected from the share that contains WAV files. Sonica is playing FLAC files with a much higher degree of reliability. While I have had a few problems, they seem to be related to quick remote control actions while running the application, it is difficult to make any problem happen with consistancy. This works a lot better than before!

I have been able to make a problem occur consistantly when reconnecting to the share with just WAV music files on it (and disconnecting the share with FLAC files on it). When first running Sonica (after deleting the DB file) everything works as advertised with no problems. The second time that the application is run, it starts to scan the files and eventually exits. If I delete the database file, Sonica loads without any problems. I have run debug mode, but it never shows any problem at all. Is it possible that I need to run Sonica with a switch that first deletes the .sonica_song.db file?

I think that it is time to copy the FLAC files onto the WAV file share and see if there is any predictablability. More to come!
 
soiaf
Posts: 785
Joined: Fri Jan 14, 2005 5:19 am

Sun Oct 09, 2005 2:15 am

Chewy wrote:
Is it possible that I need to run Sonica with a switch that first deletes the .sonica_song.db file?


A switch, no. But you can always add a line to the sonica.roku file (just before the last line (./sonica etc.)

/bin/rm  .sonica_song.db


Having a closer look at the debug logs you gave, I notice on the first run, the last line seemed to be
Writing playlist Tasha's Party to db

before it exits.

As you have in your other example, the lines you should saw after a successful scan should read
Done writing files to database
Sorting main song queue.


I'm wondering is there a problem with the "Tasha's Party" playlist (or perhaps the file after it). What then could be happening is that is falling over when processing a file, it hasn't finished properly writing the database file, and so the database file is getting corrupted/incomplete.
When you next run Sonica, the database is mostly there, but as its corrupt, depending on the song/songs you pick, it may or may not have any problems (depending on 'where' those songs are in the database).

Obviously a lot of guesswork here :wink:

But theres definitely seems to be an issue with one of your files if, from a clean removal of the database file, a clean scan does not end in
Done writing files to database
Sorting main song queue.
 
Chewy
Topic Author
Posts: 25
Joined: Sun Feb 20, 2005 9:54 pm
Location: Near Denver

Sun Oct 09, 2005 12:25 pm

Soiaf, at this point it looks like you're on to something. I renamed the Tasha playlist file and no longer is Sonica having a hard time loading when it reads the db. So far I haven't had to delete the song db to reload.

However, it appears that I am having an intermittent problem with a Vivaldi WAV file (it doesn't occur every time). If I queue it up, Sonica dumps me out of the program and the PB applications all look like cubes, and then the shares drop. A reset of the PB and all is okay again. I am trying to figure out if it is just this one song or if there are others. The good news is that all the FLAC files work perfectly.

So, at this point I am in much better shape than I was a few days ago and Sonica is running better.

Thanks
 
soiaf
Posts: 785
Joined: Fri Jan 14, 2005 5:19 am

Sun Oct 09, 2005 2:17 pm

Good news that we're making progress.

When you renamed the Tasha playlist (and did a fresh rescan), did you manage to get as far as the 'done writing to database' message - if so that would be a good sign.

Of course then the next question is why did it not like that playlist....

Yeah, the 'cubes' look is what you get when the application crashes, and brings the shares down with it.
Did you happen to be running in debug mode at the time - I'd be interested in any messages that it gave. Also in debug mode (as per earlier) one thing is look at is the song duration, as these are in milliseconds, these should be big numbers.

Obviously I'm pleased that the FLAC files are working well, but it would be good to get the whole application running smoothly - I'm sure you would prefer to just listen to the music!
 
Chewy
Topic Author
Posts: 25
Joined: Sun Feb 20, 2005 9:54 pm
Location: Near Denver

Sun Oct 09, 2005 6:20 pm

When you renamed the Tasha playlist (and did a fresh rescan), did you manage to get as far as the 'done writing to database' message - if so that would be a good sign.

Yes, it is now consistantly completing this process and I no longer delete the _sonica_song.db.

Of course then the next question is why did it not like that playlist....

I had 2 "Tasha's playlist" files, the first was a one song .PLS file (used for testing) and contained the following:
[playlist]
File1=..\Classical\English Renaissance Music\01-Galliard.wav
Title1=Classical Dude - Galliard
NumberOfEntries=1
Version=2

The second one was a .M3U file that contained references to 62 WAV files and it actually had all of the Nero type formating commands in it which makes it too voluminous to list. Here is a sample of it:
[FileInfo]
FilesCount=62
MarkersCount=61
VisFilesCount=0
[File 00001]
..\Classical\English Renaissance Music\01-Galliard.wav
DisplayName=01-Galliard.wav
StartTime=0
Duration=1208299999
CropStartLength=0
FadeInLength=0
FadeOutLength=0
CropEndLength=0
Volume=1.00

Currently, I try to strip most of that format information out of my play list files, these were older ones.

Did you happen to be running in debug mode at the time - I'd be interested in any messages that it gave.

The message that I see when the Vivaldi song fails when I am running in debug mode (which is most of the time) is as follows:
poping song 0
Popped song Autumn-Allegro from queue
Now Playing: /mnt/smb/buffalo1/music/Classical/Vivaldi/07-Autumn-Allegro.wav
Song duration: 249
Player: Queuing stream of type WAV (50332972)
and that is the final line.
I have been picking on this Vivaldi song because it is the WAV file that use to follow the "Tasha's playlist" in the debug.txt file. I am thinking of reripping it in FLAC to see if this will help! (if I can only find that CD :lol: )

Who is online

Users browsing this forum: No registered users and 5 guests