Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Nov 2014
    Posts
    11

    protocolhandler just stops playing... please help.

    Hi,

    I've re-started a plugin I started 4+ years ago but never finished and have a question about some behavior I wasn't expecting.

    Background:
    I have a plugin handler derived from IO::Handle.
    I'm trying to stream audio from another device as an infinite stream of audio chunks, being read by sysread.
    I'm returning true (1) for isRepeatingStream
    I can start playback and everything goes well for a time.

    One thing I think is weird: after about 35 minutes (and approximately every 35 minutes thereafter), the protocol handler gets re-created by LMS with the same URL even if I do nothing.

    I'm not sure that's supposed to happen or why it's happening... but it's causing me some difficulty.

    Is there a way for me to detect when the protocol handler is being created and why?
    s this supposed to happen, or did I do something in my plugin that's causing this behavior?

    I'd appreciate any help anyone can offer me...

    Thanks in advance!

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,460

    protocolhandler just stops playing... please help.

    > I'm returning true (1) for isRepeatingStream

    I think that's wrong: isRepeatingStream is being used by services where
    one URL would play a number of independent tracks. LMS then would at the
    end of every track ask the protocol handler to provide a new URL to get
    the next track from.

    From what I understand your solution is more of one "infinite" stream
    of audio data.

    But you might want to provide a little more detail about your
    implementation. Incl. sample code.

    --

    Michael

  3. #3
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    6,148
    Quote Originally Posted by littla View Post
    Hi,

    I've re-started a plugin I started 4+ years ago but never finished and have a question about some behavior I wasn't expecting.

    Background:
    I have a plugin handler derived from IO::Handle.
    I'm trying to stream audio from another device as an infinite stream of audio chunks, being read by sysread.
    I'm returning true (1) for isRepeatingStream
    I can start playback and everything goes well for a time.

    One thing I think is weird: after about 35 minutes (and approximately every 35 minutes thereafter), the protocol handler gets re-created by LMS with the same URL even if I do nothing.

    I'm not sure that's supposed to happen or why it's happening... but it's causing me some difficulty.

    Is there a way for me to detect when the protocol handler is being created and why?
    s this supposed to happen, or did I do something in my plugin that's causing this behavior?

    I'd appreciate any help anyone can offer me...

    Thanks in advance!
    Quote Originally Posted by mherger View Post
    > I'm returning true (1) for isRepeatingStream

    I think that's wrong: isRepeatingStream is being used by services where
    one URL would play a number of independent tracks. LMS then would at the
    end of every track ask the protocol handler to provide a new URL to get
    the next track from.

    From what I understand your solution is more of one "infinite" stream
    of audio data.

    But you might want to provide a little more detail about your
    implementation. Incl. sample code.

    --

    Michael
    As Michael said, if I remember, it's made so that if you want to have a single track but that "track" still ends and you want to change it (get a new one) everytime it does end, while not having a new $song object created, then isRepeatingStream(1) lets the getNextTrack update being called and your plugin takes care of updating "the" track info. It's different from a webradio where it's a single track that never ends but metadata can be updated by (eg) icy.
    LMS 7.9 on Pi 3B+ & Odroid-C2 - SqueezeAMP!, 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, Riva 1 & 3

  4. #4
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    19,318
    Quote Originally Posted by littla View Post
    One thing I think is weird: after about 35 minutes (and approximately every 35 minutes thereafter), the protocol handler gets re-created by LMS with the same URL even if I do nothing.
    A long time ago - when doing another plugin I remember a link used to reset after about 32 (or 23) mins - it was due to the maximum value of 32 bit sample count in a WAV header which affected Flac compression.

    More details on all aspects of the plugin would help - as the problem may not be where you think it is.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •