Skip to content
This repository has been archived by the owner on Oct 8, 2022. It is now read-only.

Audio #19

Open
vladdeSV opened this issue Jun 1, 2018 · 3 comments
Open

Audio #19

vladdeSV opened this issue Jun 1, 2018 · 3 comments
Labels
feature Request for a new feature help wanted
Projects

Comments

@vladdeSV
Copy link
Owner

vladdeSV commented Jun 1, 2018

Allow playing sound files. Ideally some sort of sound handling system as well.

The user should be able to

  • play a sound
  • stop a sound
@vladdeSV vladdeSV created this issue from a note in scone (TODO: In the future) Jun 1, 2018
@vladdeSV vladdeSV added the feature Request for a new feature label Jun 1, 2018
@vladdeSV vladdeSV added this to the v2.1.0 milestone Jun 1, 2018
@vladdeSV vladdeSV modified the milestones: v2.1, v2.2 Nov 12, 2018
@vladdeSV vladdeSV modified the milestones: v2.3, v2.0 Nov 19, 2018
@vladdeSV vladdeSV removed this from the v2.3 milestone Apr 29, 2020
@vladdeSV
Copy link
Owner Author

vladdeSV commented Nov 9, 2020

I have no experience with audio systems, but here is how I imagine it would function.

  1. The user registers an audio file void register(size_t id, string filePath), and uses it as audio.register(42, "./audio/my-file.flac");
  2. The user plays the audio file by providing the id, and also gets some sort of audio handle. auto handle = audio.play(42);.
  3. The user can stop the audio with audio.stop(handle), and the handle is invalidated.

P.S. Maybe the file path should be some cross-platform variant, where you can provide one path which will work for both Windows and POSIX.

@vladdeSV
Copy link
Owner Author

vladdeSV commented Nov 9, 2020

Some other features which would be great, but not necessary would be

  • setting the volume of specific audio
  • fading the volume
  • looping the audio
  • pausing the audio

@vladdeSV
Copy link
Owner Author

The user registers an audio file void register(size_t id, string filePath)

I wonder if it should be up to the user or scone to give a sound file an id. Personally I feel like it should be up to scone to do so, but I think it would be much easier if the user themselves set up the ids.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Request for a new feature help wanted
Projects
scone
TODO: In the future
Development

No branches or pull requests

1 participant