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

Function cellMusicDecodeSetSelectionContext

ps3fw/cellMusicDecode.cpp:428–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428error_code cellMusicDecodeSetSelectionContext(vm::ptr<CellMusicSelectionContext> context)
429{
430 cellMusicDecode.todo("cellMusicDecodeSetSelectionContext(context=*0x%x)", context);
431
432 if (!context)
433 return CELL_MUSIC_DECODE_ERROR_PARAM;
434
435 auto& dec = g_fxo->get<music_decode>();
436 std::lock_guard lock(dec.mutex);
437
438 if (!dec.func)
439 return CELL_MUSIC_DECODE_ERROR_GENERIC;
440
441 const bool result = dec.current_selection_context.set(*context);
442 if (result)
443 cellMusicDecode.warning("cellMusicDecodeSetSelectionContext: new selection_context = %s", dec.current_selection_context.to_string());
444 else
445 cellMusicDecode.error("cellMusicDecodeSetSelectionContext: failed. context = '%s'", music_selection_context::context_to_hex(*context));
446
447 sysutil_register_cb([&dec, result](ppu_thread& ppu) -> s32
448 {
449 const u32 status = result ? u32{CELL_OK} : u32{CELL_MUSIC_DECODE_ERROR_INVALID_CONTEXT};
450 dec.func(ppu, CELL_MUSIC_DECODE_EVENT_SET_SELECTION_CONTEXT_RESULT, vm::addr_t(status), dec.userData);
451 return CELL_OK;
452 });
453
454 return CELL_OK;
455}
456
457error_code cellMusicDecodeGetContentsId(vm::ptr<CellSearchContentId> contents_id)
458{

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