MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / cellMusicDecodeSetSelectionContext2

Function cellMusicDecodeSetSelectionContext2

ps3fw/cellMusicDecode.cpp:615–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

613}
614
615error_code cellMusicDecodeSetSelectionContext2(vm::ptr<CellMusicSelectionContext> context)
616{
617 cellMusicDecode.todo("cellMusicDecodeSetSelectionContext2(context=*0x%x)", context);
618
619 if (!context)
620 return CELL_MUSIC_DECODE_ERROR_PARAM;
621
622 auto& dec = g_fxo->get<music_decode2>();
623 std::lock_guard lock(dec.mutex);
624
625 if (!dec.func)
626 return CELL_MUSIC_DECODE_ERROR_GENERIC;
627
628 const bool result = dec.current_selection_context.set(*context);
629 if (result)
630 cellMusicDecode.warning("cellMusicDecodeSetSelectionContext2: new selection_context = %s", dec.current_selection_context.to_string());
631 else
632 cellMusicDecode.error("cellMusicDecodeSetSelectionContext2: failed. context = '%s'", music_selection_context::context_to_hex(*context));
633
634 sysutil_register_cb([&dec, result](ppu_thread& ppu) -> s32
635 {
636 const u32 status = result ? u32{CELL_OK} : u32{CELL_MUSIC_DECODE_ERROR_INVALID_CONTEXT};
637 dec.func(ppu, CELL_MUSIC_DECODE_EVENT_SET_SELECTION_CONTEXT_RESULT, vm::addr_t(status), dec.userData);
638 return CELL_OK;
639 });
640
641 return CELL_OK;
642}
643
644error_code cellMusicDecodeGetContentsId2(vm::ptr<CellSearchContentId> contents_id)
645{

Callers

nothing calls this directly

Calls 5

sysutil_register_cbFunction · 0.85
addr_tEnum · 0.85
errorMethod · 0.80
setMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected