Roland0 wrote:
> First of all, I wrote this ~3 years ago, so I have to admit I'm a bit
> hazy on the details.
> However, one thing I noticed was this modification in add_tracks
>
> >
Code:
--------------------
> >
> # original code
> if numtracks > MUSLY_MUSTYLENUMTRACKS:
> _LOGGER.debug("add_tracks: using subset for setmusicstyle")
> snumtracks = MUSLY_MUSTYLENUMTRACKS
> sample = random.sample(range(numtracks), k=MUSLY_MUSTYLENUMTRACKS)
> smtracks_type = (ctypes.POINTER(self.mtrack_type)) * MUSLY_MUSTYLENUMTRACKS
> smtracks = smtracks_type()
> i = 0
> for s in sample:
> #_LOGGER.debug("add_tracks: subset setmusicstyle: {}".format(s))
> smtracks[i] = mtracks[s]
> i += 1
> else:
> smtracks_type = mtracks_type
> smtracks = mtracks
> snumtracks = numtracks
>
> # NOT original code
> smtracks_type = mtracks_type
> smtracks = mtracks
> snumtracks = numtracks
>
> # original code continues
> # int musly_jukebox_setmusicstyle (musly_jukebox * jukebox, musly_track **
tracks, int num_tracks
> self.mus.musly_jukebox_setmusicstyle.argtypes =
[ctypes.POINTER(MuslyJukebox), ctypes.POINTER(smtracks_type), ctypes.c_int ]
>
--------------------
> >
>
D'oh!!!! That's it. Sorry. I originally thought all tacks should be
used, so removed the if part. And forgot to remove my mod when re-adding
the if/else. Strangely enough my jukebox file is now much smaller :o
Thanks for this, and the original code! Now I wonder if this will
adversly affect the mixes...
*Material debug:* 1. Launch via http: //SERVER:9000/material/?debug=json
2. Open browser's developer tools 3. Open console tab in developer tools
4. REQ/RESP messages sent to/from LMS will be logged here.
------------------------------------------------------------------------
cpd73's Profile: http://forums.slimdevices.com/member.php?userid=66686
View this thread: http://forums.slimdevices.com/showthread.php?t=108495
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins