Skip to content

Commit

Permalink
probably should keep the stereo 16-bit render for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbradsmith committed May 15, 2024
1 parent 15cd871 commit 508b321
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 12 additions & 1 deletion core/nsfplaycore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,18 @@ uint64_t nsfplay_samples_played(const NSFCore* core)
return 0;
}

uint32_t nsfplay_render(NSFCore* core, uint32_t samples, int32_t* stereo_output)
uint32_t nsfplay_render32(NSFCore* core, uint32_t samples, int32_t* stereo_output)
{
NSF_MUTEX_GUARD();
if (!core) return 0;
NSF_UNUSED(core);
NSF_UNUSED(samples);
NSF_UNUSED(stereo_output);
// TODO
return 0;
}

uint32_t nsfplay_render(NSFCore* core, uint32_t samples, int16_t* stereo_output)
{
NSF_MUTEX_GUARD();
if (!core) return 0;
Expand Down
4 changes: 3 additions & 1 deletion include/nsfplaycore.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ uint64_t nsfplay_samples_played(const NSFCore* core); // samples since song_play
// - stereo_output can be NULL if the output isn't needed
// - returns number of samples rendered, may be less than samples if song is finished (will zero fill unused output samples)
// - see shared/sound_convert.h for conversion examples to various formats
uint32_t nsfplay_render(NSFCore* core, uint32_t samples, int32_t* stereo_output);
uint32_t nsfplay_render32(NSFCore* core, uint32_t samples, int32_t* stereo_output);
// nsfplay_render32 with a conversion to the most common 16-bit stereo format for convenience
uint32_t nsfplay_render(NSFCore* core, uint32_t samples, int16_t* stereo_output);

// manually trigger render buffer allocations if needed
// call after the desired NSF is loaded and all settings have been made, but before the first render or emu_init/run
Expand Down

0 comments on commit 508b321

Please sign in to comment.