Author Topic: Play random sound from directory  (Read 7331 times)

TheThingIs

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 278
    • HCS Voicepacks
Play random sound from directory
« on: May 11, 2016, 07:07:25 AM »
playing a sound directly using {TXT:directoryname} in the filename works great but doing the same to play any file from a directory doesn't work.
The Singularity profile - One profile to rule them all and at HCS we bound them ;)

You see, TheThingIs, eventually you'll be allright.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Play random sound from directory
« Reply #1 on: May 11, 2016, 10:11:27 PM »
Hi, there.  I'm able to play random sounds from directory using tokens.  As a sanity check, I looked at the code first and found that it does process and use tokens.  Any error or warning messages, however, just shows the token and not the rendered token (corrected that while I was in there).

Code: [Select]
Set Text [directory] to 'D:\Data\Music\Gary Numan\'  <---- works with or without backslash at the end
Play random sound (from directory: {TXT:directory} - suppress repeats)

I can only assume the problem is data-related, unless there is something else that's broken (been known to happen).

Gary (not Numan)

TheThingIs

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 278
    • HCS Voicepacks
Re: Play random sound from directory
« Reply #2 on: May 12, 2016, 08:36:42 AM »
Yes, that's what was throwing me off! Atleast you've fixed it :)

Thanks Mr Numan :p
The Singularity profile - One profile to rule them all and at HCS we bound them ;)

You see, TheThingIs, eventually you'll be allright.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Play random sound from directory
« Reply #3 on: May 21, 2016, 12:36:36 AM »
New beta out:  http://voiceattack.com/SMF/index.php?topic=101.0

This should be corrected ;)