Skip to content

feat(mobile): add native iOS and Android apps - #886

Merged
ShellMonster merged 9 commits into
mainfrom
work/mobile-app
Nov 19, 2026
Merged

ShellMonster merged 9 commits into
mainfrom
work/mobile-app

Conversation

@ShellMonster

@ShellMonster ShellMonster commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

User description

Why

Bring the approved PudMusic mobile prototype to iOS and Android using native MyGo views.

What changed

  • Upgrade MyGo to v0.10.0 and wire mobile startup, secure session storage, and system media controls.
  • Add discovery, search, library, collection, login, settings, playback, and recovery views.
  • Add Android AAC and video decoding, directory selection, and audio document intake. Restore iOS imports after sandbox moves and show settings and playlists in two panes on wide displays.
  • Address Astra's first review. Preserve same-name imports, roll back canceled login writes, replace unreadable restored keys, and keep delayed playlists from overriding newer playback.

Scope

The PR stays in draft while device checks and the 102-scene prototype matrix are open. Android simulators are occupied. Audio focus, system playback controls, and file sharing need device runs. Astra is rechecking the fixes at 88730633.

Verification

  • iOS simulator and Android ARM64 APK/AAB builds pass at 88730633.
  • The installed iOS app passed native navigation through Discover, Search, My, Settings, Appearance, and Local Music. Manual checks covered AAC play/pause, queue, lyrics entry, and the document picker.
  • Race-tested regressions cover import persistence, credential cancellation and recovery, tablet navigation, and queue behavior. The Kotlin staging function kept both files in a same-name fixture.
  • The latest full Go run reported five desktop UI failures. All five also failed on origin/main: two drawer hit tests, the radius convention check, and intermittent full-player like and download cleanup tests.

CodeAnt-AI Description

Bring PudMusic to iOS and Android with native music browsing and playback

What Changed

  • Browse recommendations and search songs, playlists, creators, and videos; access playlists, history, downloads, local music, and followed creators.
  • Play music and video with a full-screen player, queue, lyrics, comments, and lock-screen controls. Playback failures offer retry or other recovery options.
  • Import audio from files, Android folders, or shared documents. Play imported and downloaded files offline, and manage or export downloaded files.
  • Sign in with a QR code, including confirmation in the Bilibili app on the same device. Adjust playback, appearance, proxy, and library display settings.

Impact

✅ Music browsing and playback on iOS and Android
✅ Offline playback for imported and downloaded tracks
✅ Playback controls from the lock screen

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Windows 真机上的 AAC spike

本评论由 windows-aac-spike 这个工作流自动贴出(每次跑覆盖上一条)。

spike.log

=== RUN   TestTheADTSFrameLengthIsTheWholeFrame
    adts_test.go:45: 按帧长走完 174 帧,正好停在文件末尾(65338 字节)
--- PASS: TestTheADTSFrameLengthIsTheWholeFrame (0.00s)
=== RUN   TestTheFirstADTSFrameHasTheLengthTheHeaderSays
--- PASS: TestTheFirstADTSFrameHasTheLengthTheHeaderSays (0.00s)
=== RUN   TestParseADTSRefusesTheWrongHeader
--- PASS: TestParseADTSRefusesTheWrongHeader (0.00s)
=== RUN   TestTheDecoderDoesNotDropTheEncoderDelayTwice
=== RUN   TestTheDecoderDoesNotDropTheEncoderDelayTwice/aaclc-stereo.m4a
    decoder_test.go:222: aaclc-stereo.m4a:第一个采样来自第 1 帧(解码器吞掉的是第 0 帧)
=== RUN   TestTheDecoderDoesNotDropTheEncoderDelayTwice/aaclc-stereo.aac
    decoder_test.go:222: aaclc-stereo.aac:第一个采样来自第 1 帧(解码器吞掉的是第 0 帧)
--- PASS: TestTheDecoderDoesNotDropTheEncoderDelayTwice (0.01s)
    --- PASS: TestTheDecoderDoesNotDropTheEncoderDelayTwice/aaclc-stereo.m4a (0.01s)
    --- PASS: TestTheDecoderDoesNotDropTheEncoderDelayTwice/aaclc-stereo.aac (0.01s)
=== RUN   TestTheDecoderHandsOutEveryFrameItPromised
=== RUN   TestTheDecoderHandsOutEveryFrameItPromised/aaclc-stereo.m4a
    decoder_test.go:237: aaclc-stereo.m4a:容器说 176400 帧,读出来 176400 帧(44100 Hz / 2 声道)
=== RUN   TestTheDecoderHandsOutEveryFrameItPromised/aaclc-stereo.aac
    decoder_test.go:237: aaclc-stereo.aac:容器说 -1 帧,读出来 177152 帧(44100 Hz / 2 声道)
--- PASS: TestTheDecoderHandsOutEveryFrameItPromised (0.01s)
    --- PASS: TestTheDecoderHandsOutEveryFrameItPromised/aaclc-stereo.m4a (0.00s)
    --- PASS: TestTheDecoderHandsOutEveryFrameItPromised/aaclc-stereo.aac (0.00s)
=== RUN   TestTheDecoderDrainsAtTheEndOfTheStream
--- PASS: TestTheDecoderDrainsAtTheEndOfTheStream (0.00s)
=== RUN   TestSeekingLandsExactlyWhereItWasAsked
=== RUN   TestSeekingLandsExactlyWhereItWasAsked/aaclc-stereo.m4a
=== RUN   TestSeekingLandsExactlyWhereItWasAsked/aaclc-stereo.aac
--- PASS: TestSeekingLandsExactlyWhereItWasAsked (0.04s)
    --- PASS: TestSeekingLandsExactlyWhereItWasAsked/aaclc-stereo.m4a (0.02s)
    --- PASS: TestSeekingLandsExactlyWhereItWasAsked/aaclc-stereo.aac (0.02s)
=== RUN   TestSeekingStartsWithTheRightSample
--- PASS: TestSeekingStartsWithTheRightSample (0.02s)
=== RUN   TestTheDecoderRefusesToSeekOutsideTheStream
--- PASS: TestTheDecoderRefusesToSeekOutsideTheStream (0.00s)
=== RUN   TestTheDecoderCountsHowLongTheADTSStreamIs
    decoder_test.go:354: 裸 ADTS:数出来 177152 帧
    decoder_test.go:362: 数出来 177152 帧,解出来 177152 帧
--- PASS: TestTheDecoderCountsHowLongTheADTSStreamIs (0.00s)
=== RUN   TestKeepingThePrimingFramePreservesPresentation
=== RUN   TestKeepingThePrimingFramePreservesPresentation/aaclc-stereo.m4a
=== RUN   TestKeepingThePrimingFramePreservesPresentation/aaclc-stereo.aac
--- PASS: TestKeepingThePrimingFramePreservesPresentation (0.03s)
    --- PASS: TestKeepingThePrimingFramePreservesPresentation/aaclc-stereo.m4a (0.01s)
    --- PASS: TestKeepingThePrimingFramePreservesPresentation/aaclc-stereo.aac (0.01s)
=== RUN   TestTheContainerIsRecognizedByItsHeader
=== RUN   TestTheContainerIsRecognizedByItsHeader/MP4_家族(真素材)
    decoder_test.go:458: MP4 家族(真素材) → "mp4"
=== RUN   TestTheContainerIsRecognizedByItsHeader/裸_ADTS(真素材)
    decoder_test.go:458: 裸 ADTS(真素材) → "adts"
=== RUN   TestTheContainerIsRecognizedByItsHeader/分片_MP4(styp)
    decoder_test.go:458: 分片 MP4(styp) → "mp4"
=== RUN   TestTheContainerIsRecognizedByItsHeader/MP3(MPEG-1_layer_III)
    decoder_test.go:458: MP3(MPEG-1 layer III) → ""
=== RUN   TestTheContainerIsRecognizedByItsHeader/MP3(MPEG-2_layer_III)
    decoder_test.go:458: MP3(MPEG-2 layer III) → ""
=== RUN   TestTheContainerIsRecognizedByItsHeader/MP3(MPEG-2.5_layer_III)
    decoder_test.go:458: MP3(MPEG-2.5 layer III) → ""
=== RUN   TestTheContainerIsRecognizedByItsHeader/一段文字
    decoder_test.go:458: 一段文字 → ""
--- PASS: TestTheContainerIsRecognizedByItsHeader (0.00s)
    --- PASS: TestTheContainerIsRecognizedByItsHeader/MP4_家族(真素材) (0.00s)
    --- PASS: TestTheContainerIsRecognizedByItsHeader/裸_ADTS(真素材) (0.00s)
    --- PASS: TestTheContainerIsRecognizedByItsHeader/分片_MP4(styp) (0.00s)
    --- PASS: TestTheContainerIsRecognizedByItsHeader/MP3(MPEG-1_layer_III) (0.00s)
    --- PASS: TestTheContainerIsRecognizedByItsHeader/MP3(MPEG-2_layer_III) (0.00s)
    --- PASS: TestTheContainerIsRecognizedByItsHeader/MP3(MPEG-2.5_layer_III) (0.00s)
    --- PASS: TestTheContainerIsRecognizedByItsHeader/一段文字 (0.00s)
=== RUN   TestTheADTSPathDerivesTheSameAudioSpecificConfig
    decoder_test.go:503: ADTS 拼出来的 ASC = 12 10(2 字节),MP4 的是 12 10 56 e5 00(5 字节,多的 3 字节是 ADTS 头表达不了的扩展信令)
--- PASS: TestTheADTSPathDerivesTheSameAudioSpecificConfig (0.00s)
=== RUN   TestTheCommittedFixturesSayWhatTheyAre
    fixture_test.go:55: aaclc-stereo.aac: 头里写的 profile=AAC-LC rate=44100 ch=2 第一帧 326 字节 crc=false
--- PASS: TestTheCommittedFixturesSayWhatTheyAre (0.00s)
=== RUN   TestTheADTSProfileFieldIsTheObjectTypeMinusOne
    fixture_test.go:111: ADTS 头里那两位是 object type 减一:解出来是 AAC-LC,和 ffprobe 的 profile=LC 一致
--- PASS: TestTheADTSProfileFieldIsTheObjectTypeMinusOne (0.00s)
=== RUN   TestTheCommittedReferenceIsWhatItClaims
    fixture_test.go:129: 参考 WAV: 177152 帧 rms=0.262226 peak=0.645752
--- PASS: TestTheCommittedReferenceIsWhatItClaims (0.00s)
=== RUN   TestTheReferenceHasNoSilence
--- PASS: TestTheReferenceHasNoSilence (0.00s)
=== RUN   TestMaxAbsDiffIsMeasuringSomething
--- PASS: TestMaxAbsDiffIsMeasuringSomething (0.00s)
=== RUN   TestEveryGUIDMatchesTheWindowsSDK
--- PASS: TestEveryGUIDMatchesTheWindowsSDK (0.00s)
=== RUN   TestTheAudioSubtypesShareMFSTypesTail
--- PASS: TestTheAudioSubtypesShareMFSTypesTail (0.00s)
=== RUN   TestTheThreeAACSubtypesAreNotInterchangeable
--- PASS: TestTheThreeAACSubtypesAreNotInterchangeable (0.00s)
=== RUN   TestParseGUIDRefusesGarbage
--- PASS: TestParseGUIDRefusesGarbage (0.00s)
=== RUN   TestParseGUIDAcceptsBothSpellings
--- PASS: TestParseGUIDAcceptsBothSpellings (0.00s)
=== RUN   TestTheVtableSlotsAreWhereTheSDKPutsThem
=== RUN   TestTheVtableSlotsAreWhereTheSDKPutsThem/IMFTransform:23_个方法,名字和下标一一对上
=== RUN   TestTheVtableSlotsAreWhereTheSDKPutsThem/IMFAttributes
=== RUN   TestTheVtableSlotsAreWhereTheSDKPutsThem/IMFSample:整张_47_格的虚表按名字钉住
=== RUN   TestTheVtableSlotsAreWhereTheSDKPutsThem/IMFMediaType:自己的_5_个方法排在_IMFAttributes_之后
=== RUN   TestTheVtableSlotsAreWhereTheSDKPutsThem/IMFMediaBuffer:Lock/Unlock_就是头两个
=== RUN   TestTheVtableSlotsAreWhereTheSDKPutsThem/Release_在_IUnknown_的第三格(0_起数)
--- PASS: TestTheVtableSlotsAreWhereTheSDKPutsThem (0.00s)
    --- PASS: TestTheVtableSlotsAreWhereTheSDKPutsThem/IMFTransform:23_个方法,名字和下标一一对上 (0.00s)
    --- PASS: TestTheVtableSlotsAreWhereTheSDKPutsThem/IMFAttributes (0.00s)
    --- PASS: TestTheVtableSlotsAreWhereTheSDKPutsThem/IMFSample:整张_47_格的虚表按名字钉住 (0.00s)
    --- PASS: TestTheVtableSlotsAreWhereTheSDKPutsThem/IMFMediaType:自己的_5_个方法排在_IMFAttributes_之后 (0.00s)
    --- PASS: TestTheVtableSlotsAreWhereTheSDKPutsThem/IMFMediaBuffer:Lock/Unlock_就是头两个 (0.00s)
    --- PASS: TestTheVtableSlotsAreWhereTheSDKPutsThem/Release_在_IUnknown_的第三格(0_起数) (0.00s)
=== RUN   TestGUIDStringIsNotTheMemoryByteOrder
--- PASS: TestGUIDStringIsNotTheMemoryByteOrder (0.00s)
=== RUN   TestTheHRESULTsAreWhatTheSDKDefines
--- PASS: TestTheHRESULTsAreWhatTheSDKDefines (0.00s)
=== RUN   TestTheMFErrorCodesAreInTheC00DFacility
--- PASS: TestTheMFErrorCodesAreInTheC00DFacility (0.00s)
=== RUN   TestTheApartmentModesAreWhatTheSDKDefines
--- PASS: TestTheApartmentModesAreWhatTheSDKDefines (0.00s)
=== RUN   TestAPlainMP4IsNotReadOneSeekPerFrame
    read_window_test.go:244: 1414 帧(854652 字节):Seek 17 次 + Read 16 次 = 33 次,上限 141
--- PASS: TestAPlainMP4IsNotReadOneSeekPerFrame (0.21s)
=== RUN   TestAFragmentedMP4IsNotReadOneSeekPerFrame
    read_window_test.go:281: 1872 帧 / 4 片(1131780 字节):Seek 27 次 + Read 26 次 = 53 次,上限 187
--- PASS: TestAFragmentedMP4IsNotReadOneSeekPerFrame (0.00s)
=== RUN   TestAStreamThatDiesKeepsItsRealReason
    read_window_test.go:362: 拆到一半断掉的错误:go-m4a: read frame 686: 这一条流拉不下来了
--- PASS: TestAStreamThatDiesKeepsItsRealReason (0.27s)
=== RUN   TestTheTwoFixturesCarryTheSameAACFrames
    source_test.go:60: 两份素材的 174 帧 AAC 载荷逐字节相同
--- PASS: TestTheTwoFixturesCarryTheSameAACFrames (0.00s)
=== RUN   TestTheADTSFramesAreOneAACFrameEach
    source_test.go:82: 174 帧 ADTS,头里的帧长和实际长度都对得上
--- PASS: TestTheADTSFramesAreOneAACFrameEach (0.00s)
=== RUN   TestAscFromADTSMatchesTheFixture
--- PASS: TestAscFromADTSMatchesTheFixture (0.00s)
=== RUN   TestHeaacUserDataIsTheTwelveBytesAfterWAVEFORMATEX
--- PASS: TestHeaacUserDataIsTheTwelveBytesAfterWAVEFORMATEX (0.00s)
=== RUN   TestHeaacFormatBlockIsTheWholeWAVEFORMAT
--- PASS: TestHeaacFormatBlockIsTheWholeWAVEFORMAT (0.00s)
=== RUN   TestReadAllDrainsAtTheEndOfTheFile
    source_test.go:266: 喂了 174 帧,drain 了 1 次
--- PASS: TestReadAllDrainsAtTheEndOfTheFile (0.00s)
=== RUN   TestSpikeAACLCDecodesOutOfMediaFoundation
=== RUN   TestSpikeAACLCDecodesOutOfMediaFoundation/aaclc-stereo.m4a
    spike_windows_test.go:85: 拆 aaclc-stereo.m4a 用了 551µs
    spike_windows_test.go:86: payloadType=0 核心码流:44100 Hz / 2 声道,ASC 5 字节
    spike_windows_test.go:88: MFT 认下的输入配置:裸 AAC + MF_MT_USER_DATA(12 字节尾巴 + ASC)
    spike_windows_test.go:89: 解码器输出:44100 Hz / 2 声道(输出样本由调用方分配:true)
    spike_windows_test.go:94: 解出 178176 帧(4.040 秒),读耗时 76ms,rms=0.261472 peak=0.645721
=== RUN   TestSpikeAACLCDecodesOutOfMediaFoundation/aaclc-stereo.aac
    spike_windows_test.go:85: 拆 aaclc-stereo.aac 用了 0s
    spike_windows_test.go:86: payloadType=1 核心码流:44100 Hz / 2 声道,ASC 2 字节
    spike_windows_test.go:88: MFT 认下的输入配置:ADTS + MF_MT_USER_DATA(12 字节尾巴 + ASC)
    spike_windows_test.go:89: 解码器输出:44100 Hz / 2 声道(输出样本由调用方分配:true)
    spike_windows_test.go:94: 解出 178176 帧(4.040 秒),读耗时 20ms,rms=0.261472 peak=0.645721
--- PASS: TestSpikeAACLCDecodesOutOfMediaFoundation (0.22s)
    --- PASS: TestSpikeAACLCDecodesOutOfMediaFoundation/aaclc-stereo.m4a (0.19s)
    --- PASS: TestSpikeAACLCDecodesOutOfMediaFoundation/aaclc-stereo.aac (0.02s)
=== RUN   TestSpikeFirstFrameLatency
    spike_windows_test.go:154: 第 1 次:拆容器 + 开解码器 + 解出第一帧 3.818ms(1024 帧样本)
    spike_windows_test.go:154: 第 2 次:拆容器 + 开解码器 + 解出第一帧 185µs(1024 帧样本)
    spike_windows_test.go:154: 第 3 次:拆容器 + 开解码器 + 解出第一帧 305µs(1024 帧样本)
    spike_windows_test.go:154: 第 4 次:拆容器 + 开解码器 + 解出第一帧 822µs(1024 帧样本)
    spike_windows_test.go:154: 第 5 次:拆容器 + 开解码器 + 解出第一帧 884µs(1024 帧样本)
    spike_windows_test.go:160: 五次里最慢的一次:3.818ms,预算 200ms
--- PASS: TestSpikeFirstFrameLatency (0.00s)
=== RUN   TestSpikeWhichProfilesWeCanActuallyTest
=== RUN   TestSpikeWhichProfilesWeCanActuallyTest/AAC-LC
    spike_windows_test.go:189: AAC-LC ✅ 能解:178176 帧 rms=0.261472 peak=0.645721
=== RUN   TestSpikeWhichProfilesWeCanActuallyTest/HE-AAC
    spike_windows_test.go:196: UNVERIFIED —— 这台机器上的 ffmpeg 造不出 HE-AAC 码流(原生 aac 编码器没有 profile 选项,要 libfdk_aac),没有素材可喂。**这一条是「没验」,不是「验过能解」。**要补:装一个 libfdk_aac 版本的 ffmpeg,`-profile:a aac_he` 造一份素材再跑这里。
--- PASS: TestSpikeWhichProfilesWeCanActuallyTest (0.02s)
    --- PASS: TestSpikeWhichProfilesWeCanActuallyTest/AAC-LC (0.02s)
    --- SKIP: TestSpikeWhichProfilesWeCanActuallyTest/HE-AAC (0.00s)
=== RUN   TestSpikePCMIsWithinTolerancesOfTheReference
=== RUN   TestSpikePCMIsWithinTolerancesOfTheReference/aaclc-stereo.m4a
    spike_windows_test.go:245: Media Foundation: 178176 帧 rms=0.261472 peak=0.645721
    spike_windows_test.go:246: ffmpeg 参考:     177152 帧 rms=0.262226 peak=0.645752
    spike_windows_test.go:261: 最佳对齐:MF 比参考晚/早 2048 个样本,最大逐样本差 = 0.066711(= 2186 个 16 位量化级)
=== RUN   TestSpikePCMIsWithinTolerancesOfTheReference/aaclc-stereo.aac
    spike_windows_test.go:245: Media Foundation: 178176 帧 rms=0.261472 peak=0.645721
    spike_windows_test.go:246: ffmpeg 参考:     177152 帧 rms=0.262226 peak=0.645752
    spike_windows_test.go:261: 最佳对齐:MF 比参考晚/早 2048 个样本,最大逐样本差 = 0.066711(= 2186 个 16 位量化级)
--- PASS: TestSpikePCMIsWithinTolerancesOfTheReference (0.16s)
    --- PASS: TestSpikePCMIsWithinTolerancesOfTheReference/aaclc-stereo.m4a (0.08s)
    --- PASS: TestSpikePCMIsWithinTolerancesOfTheReference/aaclc-stereo.aac (0.08s)
=== RUN   TestSpikeTheChannelsAreNotSwapped
=== RUN   TestSpikeTheChannelsAreNotSwapped/aaclc-stereo.m4a
    spike_windows_test.go:303: 不换:最大逐样本差 0.066711;换了:最大逐样本差 0.240906
=== RUN   TestSpikeTheChannelsAreNotSwapped/aaclc-stereo.aac
    spike_windows_test.go:303: 不换:最大逐样本差 0.066711;换了:最大逐样本差 0.240906
--- PASS: TestSpikeTheChannelsAreNotSwapped (0.29s)
    --- PASS: TestSpikeTheChannelsAreNotSwapped/aaclc-stereo.m4a (0.15s)
    --- PASS: TestSpikeTheChannelsAreNotSwapped/aaclc-stereo.aac (0.14s)
=== RUN   TestSpikeTheCOMApartmentSurvivesLoad
    spike_windows_test.go:433: 4 个 worker × 40 轮(共 160 次开/关解码器),同时 8 个 goroutine 在烧 CPU
    spike_windows_test.go:435: COM 线程被换掉的次数:0
    spike_windows_test.go:436: CO_E_NOTINITIALIZED / RPC_E_CHANGED_MODE 的次数:0
    spike_windows_test.go:437: COM 线程一共做了 320 件事
    spike_windows_test.go:438: Go 的线程数:10,逻辑核:4
--- PASS: TestSpikeTheCOMApartmentSurvivesLoad (2.16s)
=== RUN   TestSpikeTheSampleVTableIsWhatWeThink
    spike_windows_test.go:480: IMFSample 虚表自检:加了一个缓冲,读回来 1 个 → 下标对(AddBuffer=42,GetBufferCount=39,整张表 47 格,合法下标 0~46)
--- PASS: TestSpikeTheSampleVTableIsWhatWeThink (0.00s)
=== RUN   TestSpikeWhichInputTypesTheDecoderAccepts
=== RUN   TestSpikeWhichInputTypesTheDecoderAccepts/aaclc-stereo.m4a
    spike_windows_test.go:510: ✅ 裸 AAC + MF_MT_USER_DATA(12 字节尾巴 + ASC):MFT 认
    spike_windows_test.go:507: ❌ 裸 AAC + MF_MT_USER_DATA(整个 HEAACWAVEFORMAT):mfadec: SetInputType: HRESULT 0xc00d36b4
    spike_windows_test.go:507: ❌ 裸 AAC,不带 MF_MT_USER_DATA:mfadec: SetInputType: HRESULT 0xc00d36b4
=== RUN   TestSpikeWhichInputTypesTheDecoderAccepts/aaclc-stereo.aac
    spike_windows_test.go:510: ✅ ADTS + MF_MT_USER_DATA(12 字节尾巴 + ASC):MFT 认
    spike_windows_test.go:507: ❌ ADTS + MF_MT_USER_DATA(整个 HEAACWAVEFORMAT):mfadec: SetInputType: HRESULT 0xc00d36b4
    spike_windows_test.go:507: ❌ ADTS,不带 MF_MT_USER_DATA:mfadec: SetInputType: HRESULT 0xc00d36b4
--- PASS: TestSpikeWhichInputTypesTheDecoderAccepts (0.00s)
    --- PASS: TestSpikeWhichInputTypesTheDecoderAccepts/aaclc-stereo.m4a (0.00s)
    --- PASS: TestSpikeWhichInputTypesTheDecoderAccepts/aaclc-stereo.aac (0.00s)
PASS
ok  	github.com/ShellMonster/PudMusic/internal/service/audio/mfadec	3.732s

apartment.log

=== RUN   TestSpikeTheCOMApartmentSurvivesLoad
    spike_windows_test.go:433: 4 个 worker × 40 轮(共 160 次开/关解码器),同时 8 个 goroutine 在烧 CPU
    spike_windows_test.go:435: COM 线程被换掉的次数:0
    spike_windows_test.go:436: CO_E_NOTINITIALIZED / RPC_E_CHANGED_MODE 的次数:0
    spike_windows_test.go:437: COM 线程一共做了 320 件事
    spike_windows_test.go:438: Go 的线程数:10,逻辑核:4
--- PASS: TestSpikeTheCOMApartmentSurvivesLoad (2.02s)
=== RUN   TestSpikeTheCOMApartmentSurvivesLoad
    spike_windows_test.go:433: 4 个 worker × 40 轮(共 160 次开/关解码器),同时 8 个 goroutine 在烧 CPU
    spike_windows_test.go:435: COM 线程被换掉的次数:0
    spike_windows_test.go:436: CO_E_NOTINITIALIZED / RPC_E_CHANGED_MODE 的次数:0
    spike_windows_test.go:437: COM 线程一共做了 320 件事
    spike_windows_test.go:438: Go 的线程数:10,逻辑核:4
--- PASS: TestSpikeTheCOMApartmentSurvivesLoad (1.87s)
=== RUN   TestSpikeTheCOMApartmentSurvivesLoad
    spike_windows_test.go:433: 4 个 worker × 40 轮(共 160 次开/关解码器),同时 8 个 goroutine 在烧 CPU
    spike_windows_test.go:435: COM 线程被换掉的次数:0
    spike_windows_test.go:436: CO_E_NOTINITIALIZED / RPC_E_CHANGED_MODE 的次数:0
    spike_windows_test.go:437: COM 线程一共做了 320 件事
    spike_windows_test.go:438: Go 的线程数:10,逻辑核:4
--- PASS: TestSpikeTheCOMApartmentSurvivesLoad (0.32s)
=== RUN   TestSpikeTheCOMApartmentSurvivesLoad
    spike_windows_test.go:433: 4 个 worker × 40 轮(共 160 次开/关解码器),同时 8 个 goroutine 在烧 CPU
    spike_windows_test.go:435: COM 线程被换掉的次数:0
    spike_windows_test.go:436: CO_E_NOTINITIALIZED / RPC_E_CHANGED_MODE 的次数:0
    spike_windows_test.go:437: COM 线程一共做了 320 件事
    spike_windows_test.go:438: Go 的线程数:10,逻辑核:4
--- PASS: TestSpikeTheCOMApartmentSurvivesLoad (0.64s)
=== RUN   TestSpikeTheCOMApartmentSurvivesLoad
    spike_windows_test.go:433: 4 个 worker × 40 轮(共 160 次开/关解码器),同时 8 个 goroutine 在烧 CPU
    spike_windows_test.go:435: COM 线程被换掉的次数:0
    spike_windows_test.go:436: CO_E_NOTINITIALIZED / RPC_E_CHANGED_MODE 的次数:0
    spike_windows_test.go:437: COM 线程一共做了 320 件事
    spike_windows_test.go:438: Go 的线程数:10,逻辑核:4
--- PASS: TestSpikeTheCOMApartmentSurvivesLoad (1.30s)
PASS
ok  	github.com/ShellMonster/PudMusic/internal/service/audio/mfadec	6.158s

product.log

=== RUN   TestAACReferenceBudgetsCoverKnownSystemDecoderDifferences
--- PASS: TestAACReferenceBudgetsCoverKnownSystemDecoderDifferences (0.00s)
=== RUN   TestTheProductPathDecodesAACSampleForSample
    aac_reference_test.go:119: 容器名 = "aac",44100 Hz / 2 声道
    aac_reference_test.go:130: 产品这一层解出来 176400 帧(4.000 秒)
    aac_reference_test.go:139: ffmpeg 参考:177152 帧,44100 Hz / 2 声道
    aac_reference_test.go:146: 最佳对齐:产品这一层比参考晚/早 2048 个采样,最大逐样本差 = 0.066711(= 2186 个 16 位量化级),平均逐样本差 = 0.000885
--- PASS: TestTheProductPathDecodesAACSampleForSample (0.10s)
=== RUN   TestTheProductPathDecodesADTSSampleForSample
    aac_reference_test.go:186: 容器名 = "aac",44100 Hz / 2 声道
    aac_reference_test.go:197: 裸 ADTS 解出来 178176 帧(4.040 秒)
    aac_reference_test.go:205: ffmpeg 参考:177152 帧,44100 Hz / 2 声道
    aac_reference_test.go:208: 最佳对齐:裸 ADTS 比参考晚/早 2048 个采样,最大逐样本差 = 0.066711(= 2186 个 16 位量化级),平均逐样本差 = 0.000879
--- PASS: TestTheProductPathDecodesADTSSampleForSample (0.08s)
=== RUN   TestTheProductPathKeepsTheChannelsInPlace
    aac_reference_test.go:241: ffmpeg 参考:177152 帧,44100 Hz / 2 声道
    aac_reference_test.go:252: 不换:最大逐样本差 0.066711;换了:最大逐样本差 0.240906(3.61 倍)
--- PASS: TestTheProductPathKeepsTheChannelsInPlace (0.15s)
=== RUN   TestAIFFDecodesBackToTheSameSamples
--- PASS: TestAIFFDecodesBackToTheSameSamples (0.01s)
=== RUN   TestAIFFSeekLandsExactly
--- PASS: TestAIFFSeekLandsExactly (0.01s)
=== RUN   TestAIFCRejectsCompressed
    aiff_test.go:221: 报的错是 audio: AIFC of a compression other than NONE(不是 ErrFormat,是具体的格式错)
--- PASS: TestAIFCRejectsCompressed (0.00s)
=== RUN   TestExtended80RoundTrip
--- PASS: TestExtended80RoundTrip (0.00s)
=== RUN   TestOpenRoutesMP4ToTheSystemDecoder
--- PASS: TestOpenRoutesMP4ToTheSystemDecoder (0.00s)
=== RUN   TestOpenRoutesRawADTS
--- PASS: TestOpenRoutesRawADTS (0.00s)
=== RUN   TestOpenStillFindsTheOldFormats
    containers_test.go:86: 这台机器上没有 Ping.aiff
--- SKIP: TestOpenStillFindsTheOldFormats (0.00s)
=== RUN   TestOpenRejectsSomethingThatIsNotAudio
--- PASS: TestOpenRejectsSomethingThatIsNotAudio (0.00s)
=== RUN   TestTheAACOnlineStreamActuallyPlays
    coverage_test.go:120: 容器名 = "aac",44100 Hz / 2 声道
    coverage_test.go:132: 解出来 352800 个采样(4.000 秒)
--- PASS: TestTheAACOnlineStreamActuallyPlays (0.03s)
=== RUN   TestTheFirstFrameComesOutFast
    coverage_test.go:177: 第 1 轮:开口到第一个采样 625µs(8192 个采样)
    coverage_test.go:177: 第 2 轮:开口到第一个采样 1.496ms(8192 个采样)
    coverage_test.go:177: 第 3 轮:开口到第一个采样 1.015ms(8192 个采样)
    coverage_test.go:177: 第 4 轮:开口到第一个采样 1.037ms(8192 个采样)
    coverage_test.go:177: 第 5 轮:开口到第一个采样 1.099ms(8192 个采样)
    coverage_test.go:185: 五轮里最快的一次:625µs,最慢的一次:1.496ms,预算 200ms
--- PASS: TestTheFirstFrameComesOutFast (0.01s)
=== RUN   TestTheBilibiliQualityCoverage
    coverage_test.go:202: 平台:Windows
=== RUN   TestTheBilibiliQualityCoverage/64K
    coverage_test.go:247: ✅ 64K(AAC-LC (mp4a.40.2)):能解——容器 aac,44100 Hz / 2 声道,首块 8192 个采样,峰值 0.742188
=== RUN   TestTheBilibiliQualityCoverage/128K
    coverage_test.go:247: ✅ 128K(AAC-LC (mp4a.40.2)):能解——容器 aac,44100 Hz / 2 声道,首块 8192 个采样,峰值 0.645721
=== RUN   TestTheBilibiliQualityCoverage/192K
    coverage_test.go:247: ✅ 192K(AAC-LC (mp4a.40.2)):能解——容器 aac,44100 Hz / 2 声道,首块 8192 个采样,峰值 0.646454
=== RUN   TestTheBilibiliQualityCoverage/杜比全景声
    coverage_test.go:213: ❌ 杜比全景声(E-AC-3 (ec-3)):audio: 这个音频流解不了: extaf: this platform has no AudioToolbox (the macOS system audio decoder): mfadec: 认不出这个 MP4:go-m4a: audio track codec is not mp4a, Opus, or fLaC: go-m4a: unsupported container: flacdec: go-m4a: audio track codec is not mp4a, Opus, or fLaC: go-m4a: unsupported container
    coverage_test.go:214:    划掉的理由:field-of-use(授权限制),而且 Win11 24H2 移除了系统自带的 AC-3 解码器
=== RUN   TestTheBilibiliQualityCoverage/Hi-Res_无损
    coverage_test.go:247: ✅ Hi-Res 无损(FLAC):能解——容器 flac,44100 Hz / 2 声道,首块 8192 个采样,峰值 0.500000
--- PASS: TestTheBilibiliQualityCoverage (0.01s)
    --- PASS: TestTheBilibiliQualityCoverage/64K (0.00s)
    --- PASS: TestTheBilibiliQualityCoverage/128K (0.00s)
    --- PASS: TestTheBilibiliQualityCoverage/192K (0.00s)
    --- PASS: TestTheBilibiliQualityCoverage/杜比全景声 (0.00s)
    --- PASS: TestTheBilibiliQualityCoverage/Hi-Res_无损 (0.00s)
=== RUN   TestEndedAndErrAreComplementary
--- PASS: TestEndedAndErrAreComplementary (0.00s)
=== RUN   TestSeekClearsTheEndedLatch
--- PASS: TestSeekClearsTheEndedLatch (0.00s)
=== RUN   TestFlatEQLeavesTheSamplesAlone
--- PASS: TestFlatEQLeavesTheSamplesAlone (0.00s)
=== RUN   TestTheBassPresetLiftsLowsAgainstHighs
--- PASS: TestTheBassPresetLiftsLowsAgainstHighs (0.01s)
=== RUN   TestTheEQNeverMakesThePeakLouderThanTheInput
--- PASS: TestTheEQNeverMakesThePeakLouderThanTheInput (0.03s)
=== RUN   TestAnUnknownPresetIsFlat
--- PASS: TestAnUnknownPresetIsFlat (0.00s)
=== RUN   TestRampEaseIsACosineCurve
--- PASS: TestRampEaseIsACosineCurve (0.00s)
=== RUN   TestTheVolumeFadesInOnStart
--- PASS: TestTheVolumeFadesInOnStart (0.22s)
=== RUN   TestSettingTheVolumeRamps
--- PASS: TestSettingTheVolumeRamps (0.38s)
=== RUN   TestMutingFadesOut
--- PASS: TestMutingFadesOut (0.37s)
=== RUN   TestSettingTheVolumeRetargetsTheRamp
--- PASS: TestSettingTheVolumeRetargetsTheRamp (0.61s)
=== RUN   TestCloseStopsTheRamp
--- PASS: TestCloseStopsTheRamp (0.40s)
=== RUN   TestALongFadeInOnlyAppliesToTheNextPlay
--- PASS: TestALongFadeInOnlyAppliesToTheNextPlay (0.50s)
=== RUN   TestFadeOutGoesToZeroAndSetVolumeBringsItBack
--- PASS: TestFadeOutGoesToZeroAndSetVolumeBringsItBack (0.77s)
=== RUN   TestOpenDecoderFallsBackToFLACWhenThePlatformDecoderIsUnavailable
--- PASS: TestOpenDecoderFallsBackToFLACWhenThePlatformDecoderIsUnavailable (0.02s)
=== RUN   TestThePlatformDecoderIsUsedWhenItIsAvailable
--- PASS: TestThePlatformDecoderIsUsedWhenItIsAvailable (0.00s)
=== RUN   TestOpenDecoderDoesNotFallBackWhenTheFileItselfIsBroken
--- PASS: TestOpenDecoderDoesNotFallBackWhenTheFileItselfIsBroken (0.00s)
=== RUN   TestOpenDecoderSaysBothWhenThePlatformIsUnavailableAndTheFileIsNotFLAC
--- PASS: TestOpenDecoderSaysBothWhenThePlatformIsUnavailableAndTheFileIsNotFLAC (0.00s)
=== RUN   TestOpenDecoderUsesMediaFoundationWhenThePlatformDecoderIsUnavailable
--- PASS: TestOpenDecoderUsesMediaFoundationWhenThePlatformDecoderIsUnavailable (0.00s)
=== RUN   TestOpenDecoderDoesNotUseMediaFoundationWhenThePlatformDecoderIsAvailable
--- PASS: TestOpenDecoderDoesNotUseMediaFoundationWhenThePlatformDecoderIsAvailable (0.00s)
=== RUN   TestOpenDecoderFallsBackToFLACWhenMediaFoundationCannotDecodeTheFile
--- PASS: TestOpenDecoderFallsBackToFLACWhenMediaFoundationCannotDecodeTheFile (0.00s)
=== RUN   TestOpenDecoderSaysWhyMediaFoundationCouldNotDecodeIt
    fallback_test.go:281: 最终那句错:audio: 这个音频流解不了: extaf: this platform has no AudioToolbox (the macOS system audio decoder): mfadec: 这个 MP4 里不是 AAC(是 ec-3): flacdec: not a FLAC stream: ISO-BMFF track is AAC-LC
--- PASS: TestOpenDecoderSaysWhyMediaFoundationCouldNotDecodeIt (0.00s)
=== RUN   TestOwnedClosesTheDecoderAndItsFile
--- PASS: TestOwnedClosesTheDecoderAndItsFile (0.00s)
=== RUN   TestOpenAnMP4ReleasesTheAudioToolboxHandle
    handles_test.go:71: 这条断的是 AudioToolbox 的句柄,只有 macOS 有这一层
--- SKIP: TestOpenAnMP4ReleasesTheAudioToolboxHandle (0.00s)
=== RUN   TestSwitchingTracksLeaksNoFileHandles
    handles_test.go:108: 这台机器上读不到 /dev/fd:open /dev/fd: The system cannot find the path specified.
--- SKIP: TestSwitchingTracksLeaksNoFileHandles (0.20s)
=== RUN   TestMPEG25ReallyDecodes
--- PASS: TestMPEG25ReallyDecodes (0.00s)
=== RUN   TestTheLameGaplessTrimIsApplied
--- PASS: TestTheLameGaplessTrimIsApplied (0.00s)
=== RUN   TestTheGaplessDecodeStartsWhereTheSourceStarts
--- PASS: TestTheGaplessDecodeStartsWhereTheSourceStarts (0.00s)
=== RUN   TestOpeningAnMp3DoesNotReadTheWholeFile
    mp3_test.go:275: 打开一个 1044900 字节的 MP3,一共读了 65555 字节(6.3%)
--- PASS: TestOpeningAnMp3DoesNotReadTheWholeFile (0.01s)
=== RUN   TestTheMp3DurationIsProbedFromItsOwnContainer
=== RUN   TestTheMp3DurationIsProbedFromItsOwnContainer/mpeg25.mp3
=== RUN   TestTheMp3DurationIsProbedFromItsOwnContainer/gapless.mp3
--- PASS: TestTheMp3DurationIsProbedFromItsOwnContainer (0.00s)
    --- PASS: TestTheMp3DurationIsProbedFromItsOwnContainer/mpeg25.mp3 (0.00s)
    --- PASS: TestTheMp3DurationIsProbedFromItsOwnContainer/gapless.mp3 (0.00s)
=== RUN   TestTheMp3DecoderIsOurs
--- PASS: TestTheMp3DecoderIsOurs (0.00s)
=== RUN   TestTheTopLevelWalkFindsTheTrailingMoov
--- PASS: TestTheTopLevelWalkFindsTheTrailingMoov (0.00s)
=== RUN   TestTheTopLevelWalkFindsTheMoovAtTheFront
--- PASS: TestTheTopLevelWalkFindsTheMoovAtTheFront (0.00s)
=== RUN   TestTheTopLevelWalkGivesUpOnTheOtherShapes
--- PASS: TestTheTopLevelWalkGivesUpOnTheOtherShapes (0.00s)
=== RUN   TestTheTopLevelWalkHandlesTheSixtyFourBitSize
--- PASS: TestTheTopLevelWalkHandlesTheSixtyFourBitSize (0.00s)
=== RUN   TestTheTopLevelWalkOnTheRealFixtures
--- PASS: TestTheTopLevelWalkOnTheRealFixtures (0.00s)
=== RUN   TestTheLastStageIsMutedWhenTestsRun
--- PASS: TestTheLastStageIsMutedWhenTestsRun (0.00s)
=== RUN   TestTheMeterReadsTheEBUReferenceTone
--- PASS: TestTheMeterReadsTheEBUReferenceTone (0.04s)
=== RUN   TestTheMeterIgnoresSilenceAroundTheMusic
--- PASS: TestTheMeterIgnoresSilenceAroundTheMusic (0.29s)
=== RUN   TestNormalizeTurnsALoudStreamDownToTheTarget
--- PASS: TestNormalizeTurnsALoudStreamDownToTheTarget (0.02s)
=== RUN   TestNormalizeNeverBoostsAQuietStream
--- PASS: TestNormalizeNeverBoostsAQuietStream (0.02s)
=== RUN   TestUnknownStreamStartsConservativelyBeforeTheMeterSettles
--- PASS: TestUnknownStreamStartsConservativelyBeforeTheMeterSettles (0.00s)
=== RUN   TestNormalizeIsAbsentWhenOff
--- PASS: TestNormalizeIsAbsentWhenOff (0.01s)
=== RUN   TestAKnownQuietTrackIsBoostedButNeverPastThePeakCeiling
--- PASS: TestAKnownQuietTrackIsBoostedButNeverPastThePeakCeiling (0.00s)
=== RUN   TestAKnownLoudTrackIsTurnedDownToTheFloorAtMost
--- PASS: TestAKnownLoudTrackIsTurnedDownToTheFloorAtMost (0.00s)
=== RUN   TestAKnownTrackUsesTheMeasuredGainFromTheFirstBlock
--- PASS: TestAKnownTrackUsesTheMeasuredGainFromTheFirstBlock (0.02s)
=== RUN   TestABoostOffKnownQuietTrackStaysAtUnity
--- PASS: TestABoostOffKnownQuietTrackStaysAtUnity (0.00s)
=== RUN   TestAKnownQuietTrackWithoutAPeakIsNotBoosted
--- PASS: TestAKnownQuietTrackWithoutAPeakIsNotBoosted (0.00s)
=== RUN   TestBoostLiftsAQuietStreamTowardsTheTarget
--- PASS: TestBoostLiftsAQuietStreamTowardsTheTarget (0.02s)
=== RUN   TestBoostRespectsTheTruePeakCeiling
--- PASS: TestBoostRespectsTheTruePeakCeiling (0.02s)
=== RUN   TestOpenPlaysEachSupportedFormat
=== RUN   TestOpenPlaysEachSupportedFormat/flac
=== RUN   TestOpenPlaysEachSupportedFormat/mp3
=== RUN   TestOpenPlaysEachSupportedFormat/ogg
=== RUN   TestOpenPlaysEachSupportedFormat/aiff
=== RUN   TestOpenPlaysEachSupportedFormat/wav
--- PASS: TestOpenPlaysEachSupportedFormat (0.61s)
    --- PASS: TestOpenPlaysEachSupportedFormat/flac (0.12s)
    --- PASS: TestOpenPlaysEachSupportedFormat/mp3 (0.12s)
    --- PASS: TestOpenPlaysEachSupportedFormat/ogg (0.12s)
    --- PASS: TestOpenPlaysEachSupportedFormat/aiff (0.12s)
    --- PASS: TestOpenPlaysEachSupportedFormat/wav (0.12s)
=== RUN   TestSystemAudioOutputOpens
    player_test.go:84: 这台机器没有可用的音频输出,跳过:audio: no audio output
--- SKIP: TestSystemAudioOutputOpens (0.00s)
=== RUN   TestOpenRejectsWhatItCannotPlay
--- PASS: TestOpenRejectsWhatItCannotPlay (0.00s)
=== RUN   TestTheStreamAndTheFileGoThroughOneRegistry
=== RUN   TestTheStreamAndTheFileGoThroughOneRegistry/裸_FLAC
=== RUN   TestTheStreamAndTheFileGoThroughOneRegistry/MP4_里的_FLAC
=== RUN   TestTheStreamAndTheFileGoThroughOneRegistry/扩展名撒谎的(内容是_WAV)
--- PASS: TestTheStreamAndTheFileGoThroughOneRegistry (0.02s)
    --- PASS: TestTheStreamAndTheFileGoThroughOneRegistry/裸_FLAC (0.00s)
    --- PASS: TestTheStreamAndTheFileGoThroughOneRegistry/MP4_里的_FLAC (0.01s)
    --- PASS: TestTheStreamAndTheFileGoThroughOneRegistry/扩展名撒谎的(内容是_WAV) (0.01s)
=== RUN   TestContentDecidesTheContainerNotTheFileName
--- PASS: TestContentDecidesTheContainerNotTheFileName (0.01s)
=== RUN   TestLosslessFLACFromTheStreamIsSampleForSample
=== RUN   TestLosslessFLACFromTheStreamIsSampleForSample/stereo16.flac
=== RUN   TestLosslessFLACFromTheStreamIsSampleForSample/stereo16.mp4
--- PASS: TestLosslessFLACFromTheStreamIsSampleForSample (0.04s)
    --- PASS: TestLosslessFLACFromTheStreamIsSampleForSample/stereo16.flac (0.02s)
    --- PASS: TestLosslessFLACFromTheStreamIsSampleForSample/stereo16.mp4 (0.02s)
=== RUN   TestAAC320FromTheStreamIsAudibleFast
    quality_test.go:360: AAC 那条路(AudioToolbox)只有 macOS 有
--- SKIP: TestAAC320FromTheStreamIsAudibleFast (0.00s)
=== RUN   TestAAC320FromTheStreamActuallyDecodes
    quality_test.go:398: AAC 那条路(AudioToolbox)只有 macOS 有
--- SKIP: TestAAC320FromTheStreamActuallyDecodes (0.00s)
=== RUN   TestUnityRateIsSampleForSample
--- PASS: TestUnityRateIsSampleForSample (0.00s)
=== RUN   TestRateKeepsThePitch
=== RUN   TestRateKeepsThePitch/0.5x
=== PAUSE TestRateKeepsThePitch/0.5x
=== RUN   TestRateKeepsThePitch/0.75x
=== PAUSE TestRateKeepsThePitch/0.75x
=== RUN   TestRateKeepsThePitch/1x
=== PAUSE TestRateKeepsThePitch/1x
=== RUN   TestRateKeepsThePitch/1.25x
=== PAUSE TestRateKeepsThePitch/1.25x
=== RUN   TestRateKeepsThePitch/1.5x
=== PAUSE TestRateKeepsThePitch/1.5x
=== RUN   TestRateKeepsThePitch/1.75x
=== PAUSE TestRateKeepsThePitch/1.75x
=== RUN   TestRateKeepsThePitch/2x
=== PAUSE TestRateKeepsThePitch/2x
=== CONT  TestRateKeepsThePitch/0.5x
=== CONT  TestRateKeepsThePitch/1.5x
=== CONT  TestRateKeepsThePitch/1x
=== CONT  TestRateKeepsThePitch/2x
=== CONT  TestRateKeepsThePitch/1.25x
=== CONT  TestRateKeepsThePitch/1.75x
=== CONT  TestRateKeepsThePitch/0.75x
--- PASS: TestRateKeepsThePitch (0.00s)
    --- PASS: TestRateKeepsThePitch/1x (0.00s)
    --- PASS: TestRateKeepsThePitch/2x (0.01s)
    --- PASS: TestRateKeepsThePitch/1.5x (0.01s)
    --- PASS: TestRateKeepsThePitch/1.25x (0.02s)
    --- PASS: TestRateKeepsThePitch/1.75x (0.01s)
    --- PASS: TestRateKeepsThePitch/0.75x (0.02s)
    --- PASS: TestRateKeepsThePitch/0.5x (0.04s)
=== RUN   TestRateShortensAndLengthens
=== RUN   TestRateShortensAndLengthens/0.5x
=== PAUSE TestRateShortensAndLengthens/0.5x
=== RUN   TestRateShortensAndLengthens/0.75x
=== PAUSE TestRateShortensAndLengthens/0.75x
=== RUN   TestRateShortensAndLengthens/1x
=== PAUSE TestRateShortensAndLengthens/1x
=== RUN   TestRateShortensAndLengthens/1.25x
=== PAUSE TestRateShortensAndLengthens/1.25x
=== RUN   TestRateShortensAndLengthens/1.5x
=== PAUSE TestRateShortensAndLengthens/1.5x
=== RUN   TestRateShortensAndLengthens/1.75x
=== PAUSE TestRateShortensAndLengthens/1.75x
=== RUN   TestRateShortensAndLengthens/2x
=== PAUSE TestRateShortensAndLengthens/2x
=== CONT  TestRateShortensAndLengthens/0.5x
=== CONT  TestRateShortensAndLengthens/1.5x
=== CONT  TestRateShortensAndLengthens/1x
=== CONT  TestRateShortensAndLengthens/2x
=== CONT  TestRateShortensAndLengthens/0.75x
=== CONT  TestRateShortensAndLengthens/1.25x
=== CONT  TestRateShortensAndLengthens/1.75x
--- PASS: TestRateShortensAndLengthens (0.00s)
    --- PASS: TestRateShortensAndLengthens/1x (0.00s)
    --- PASS: TestRateShortensAndLengthens/2x (0.01s)
    --- PASS: TestRateShortensAndLengthens/1.5x (0.02s)
    --- PASS: TestRateShortensAndLengthens/0.75x (0.03s)
    --- PASS: TestRateShortensAndLengthens/1.25x (0.02s)
    --- PASS: TestRateShortensAndLengthens/1.75x (0.02s)
    --- PASS: TestRateShortensAndLengthens/0.5x (0.05s)
=== RUN   TestSetPositionLandsWhereItWasAsked
=== RUN   TestSetPositionLandsWhereItWasAsked/0.5x
=== PAUSE TestSetPositionLandsWhereItWasAsked/0.5x
=== RUN   TestSetPositionLandsWhereItWasAsked/0.75x
=== PAUSE TestSetPositionLandsWhereItWasAsked/0.75x
=== RUN   TestSetPositionLandsWhereItWasAsked/1x
=== PAUSE TestSetPositionLandsWhereItWasAsked/1x
=== RUN   TestSetPositionLandsWhereItWasAsked/1.5x
=== PAUSE TestSetPositionLandsWhereItWasAsked/1.5x
=== RUN   TestSetPositionLandsWhereItWasAsked/2x
=== PAUSE TestSetPositionLandsWhereItWasAsked/2x
=== CONT  TestSetPositionLandsWhereItWasAsked/0.5x
=== CONT  TestSetPositionLandsWhereItWasAsked/1.5x
=== CONT  TestSetPositionLandsWhereItWasAsked/1x
=== CONT  TestSetPositionLandsWhereItWasAsked/2x
=== CONT  TestSetPositionLandsWhereItWasAsked/0.75x
--- PASS: TestSetPositionLandsWhereItWasAsked (0.00s)
    --- PASS: TestSetPositionLandsWhereItWasAsked/1x (0.02s)
    --- PASS: TestSetPositionLandsWhereItWasAsked/2x (0.02s)
    --- PASS: TestSetPositionLandsWhereItWasAsked/1.5x (0.03s)
    --- PASS: TestSetPositionLandsWhereItWasAsked/0.5x (0.03s)
    --- PASS: TestSetPositionLandsWhereItWasAsked/0.75x (0.02s)
=== RUN   TestSourceAtWalksTheSong
=== RUN   TestSourceAtWalksTheSong/0.5x
=== PAUSE TestSourceAtWalksTheSong/0.5x
=== RUN   TestSourceAtWalksTheSong/1x
=== PAUSE TestSourceAtWalksTheSong/1x
=== RUN   TestSourceAtWalksTheSong/1.75x
=== PAUSE TestSourceAtWalksTheSong/1.75x
=== RUN   TestSourceAtWalksTheSong/2x
=== PAUSE TestSourceAtWalksTheSong/2x
=== CONT  TestSourceAtWalksTheSong/0.5x
=== CONT  TestSourceAtWalksTheSong/1.75x
=== CONT  TestSourceAtWalksTheSong/1x
=== CONT  TestSourceAtWalksTheSong/2x
--- PASS: TestSourceAtWalksTheSong (0.00s)
    --- PASS: TestSourceAtWalksTheSong/1x (0.00s)
    --- PASS: TestSourceAtWalksTheSong/2x (0.02s)
    --- PASS: TestSourceAtWalksTheSong/1.75x (0.02s)
    --- PASS: TestSourceAtWalksTheSong/0.5x (0.05s)
=== RUN   TestSourceAtSurvivesASeek
--- PASS: TestSourceAtSurvivesASeek (0.03s)
=== RUN   TestSetRateMidStreamDoesNotJump
--- PASS: TestSetRateMidStreamDoesNotJump (0.00s)
=== RUN   TestChangingRateMidStreamNeverGoesBackwards
=== RUN   TestChangingRateMidStreamNeverGoesBackwards/快到慢
=== PAUSE TestChangingRateMidStreamNeverGoesBackwards/快到慢
=== RUN   TestChangingRateMidStreamNeverGoesBackwards/慢到快
=== PAUSE TestChangingRateMidStreamNeverGoesBackwards/慢到快
=== RUN   TestChangingRateMidStreamNeverGoesBackwards/来回
=== PAUSE TestChangingRateMidStreamNeverGoesBackwards/来回
=== CONT  TestChangingRateMidStreamNeverGoesBackwards/快到慢
=== CONT  TestChangingRateMidStreamNeverGoesBackwards/来回
=== CONT  TestChangingRateMidStreamNeverGoesBackwards/慢到快
--- PASS: TestChangingRateMidStreamNeverGoesBackwards (0.00s)
    --- PASS: TestChangingRateMidStreamNeverGoesBackwards/来回 (0.02s)
    --- PASS: TestChangingRateMidStreamNeverGoesBackwards/慢到快 (0.04s)
    --- PASS: TestChangingRateMidStreamNeverGoesBackwards/快到慢 (0.06s)
=== RUN   TestPositionDoesNotWaitOnTheDecoder
--- PASS: TestPositionDoesNotWaitOnTheDecoder (0.01s)
=== RUN   TestPositionIsTheSeekTargetBeforeTheDecoderCatchesUp
--- PASS: TestPositionIsTheSeekTargetBeforeTheDecoderCatchesUp (0.00s)
=== RUN   TestALateResetFromAnOlderSeekKeepsTheNewTarget
--- PASS: TestALateResetFromAnOlderSeekKeepsTheNewTarget (0.04s)
=== RUN   TestReadRejectsABufferTooSmallForAFrame
--- PASS: TestReadRejectsABufferTooSmallForAFrame (0.00s)
=== RUN   TestClampRateAndSnap
--- PASS: TestClampRateAndSnap (0.00s)
=== RUN   TestRateStepsCoverTheDocumentedRange
--- PASS: TestRateStepsCoverTheDocumentedRange (0.00s)
=== RUN   TestPlayerRateIsIndependentOfMyGoSpeed
--- PASS: TestPlayerRateIsIndependentOfMyGoSpeed (0.00s)
=== RUN   TestPlayerSeekIsExactAtAnyRate
=== RUN   TestPlayerSeekIsExactAtAnyRate/0.5x
=== PAUSE TestPlayerSeekIsExactAtAnyRate/0.5x
=== RUN   TestPlayerSeekIsExactAtAnyRate/0.75x
=== PAUSE TestPlayerSeekIsExactAtAnyRate/0.75x
=== RUN   TestPlayerSeekIsExactAtAnyRate/1x
=== PAUSE TestPlayerSeekIsExactAtAnyRate/1x
=== RUN   TestPlayerSeekIsExactAtAnyRate/1.25x
=== PAUSE TestPlayerSeekIsExactAtAnyRate/1.25x
=== RUN   TestPlayerSeekIsExactAtAnyRate/1.5x
=== PAUSE TestPlayerSeekIsExactAtAnyRate/1.5x
=== RUN   TestPlayerSeekIsExactAtAnyRate/1.75x
=== PAUSE TestPlayerSeekIsExactAtAnyRate/1.75x
=== RUN   TestPlayerSeekIsExactAtAnyRate/2x
=== PAUSE TestPlayerSeekIsExactAtAnyRate/2x
=== CONT  TestPlayerSeekIsExactAtAnyRate/0.5x
=== CONT  TestPlayerSeekIsExactAtAnyRate/1.5x
=== CONT  TestPlayerSeekIsExactAtAnyRate/1x
=== CONT  TestPlayerSeekIsExactAtAnyRate/2x
=== CONT  TestPlayerSeekIsExactAtAnyRate/0.75x
=== CONT  TestPlayerSeekIsExactAtAnyRate/1.75x
=== CONT  TestPlayerSeekIsExactAtAnyRate/1.25x
--- PASS: TestPlayerSeekIsExactAtAnyRate (0.01s)
    --- PASS: TestPlayerSeekIsExactAtAnyRate/0.5x (0.00s)
    --- PASS: TestPlayerSeekIsExactAtAnyRate/1.5x (0.00s)
    --- PASS: TestPlayerSeekIsExactAtAnyRate/1x (0.00s)
    --- PASS: TestPlayerSeekIsExactAtAnyRate/0.75x (0.00s)
    --- PASS: TestPlayerSeekIsExactAtAnyRate/2x (0.00s)
    --- PASS: TestPlayerSeekIsExactAtAnyRate/1.75x (0.00s)
    --- PASS: TestPlayerSeekIsExactAtAnyRate/1.25x (0.00s)
=== RUN   TestAPendingSeekClearsOnceTheDecoderAppliesIt
--- PASS: TestAPendingSeekClearsOnceTheDecoderAppliesIt (0.01s)
=== RUN   TestSeekWhilePlayingHasNoDiscontinuity
    seek_declick_test.go:144: max sample step 0.0288 at index 1386 of 4341
--- PASS: TestSeekWhilePlayingHasNoDiscontinuity (0.02s)
=== RUN   TestSeekWhilePlayingDoesNotBlock
--- PASS: TestSeekWhilePlayingDoesNotBlock (0.01s)
=== RUN   TestSeekGapReportsUserView
--- PASS: TestSeekGapReportsUserView (0.01s)
=== RUN   TestPlayDuringSeekGapWaitsForLanding
--- PASS: TestPlayDuringSeekGapWaitsForLanding (0.01s)
=== RUN   TestStaleSeekIsDropped
--- PASS: TestStaleSeekIsDropped (0.01s)
=== RUN   TestPauseDuringSeekGapStaysPaused
--- PASS: TestPauseDuringSeekGapStaysPaused (0.01s)
=== RUN   TestCloseDuringSeekGap
--- PASS: TestCloseDuringSeekGap (0.01s)
=== RUN   TestSeekWhilePausedIsImmediate
--- PASS: TestSeekWhilePausedIsImmediate (0.01s)
=== RUN   TestStreamSourceTempGaugeFollowsTheFileAndClose
--- PASS: TestStreamSourceTempGaugeFollowsTheFileAndClose (0.00s)
=== RUN   TestStreamSourceTempGaugeDoesNotOutliveAFailedStream
--- PASS: TestStreamSourceTempGaugeDoesNotOutliveAFailedStream (0.00s)
=== RUN   TestStreamSourceTempGaugeIncludesTailAndRestartClearsIt
--- PASS: TestStreamSourceTempGaugeIncludesTailAndRestartClearsIt (0.01s)
=== RUN   TestStreamSourceTempGaugeCountsTailOverlapOnce
--- PASS: TestStreamSourceTempGaugeCountsTailOverlapOnce (0.01s)
=== RUN   TestStreamSourceTempGaugeIgnoresFailedTailFetch
--- PASS: TestStreamSourceTempGaugeIgnoresFailedTailFetch (0.00s)
=== RUN   TestTheDefaultBackoffIsOneTwoFour
--- PASS: TestTheDefaultBackoffIsOneTwoFour (0.00s)
=== RUN   TestARetryWaitsBeforeItRetries
--- PASS: TestARetryWaitsBeforeItRetries (0.02s)
=== RUN   TestTheBackoffGrowsWithEveryRetry
--- PASS: TestTheBackoffGrowsWithEveryRetry (0.14s)
=== RUN   TestTheBackoffStopsAtItsLastValue
--- PASS: TestTheBackoffStopsAtItsLastValue (0.05s)
=== RUN   TestTheSourceGivesUpAfterTheBackoffIsUsedUp
--- PASS: TestTheSourceGivesUpAfterTheBackoffIsUsedUp (0.01s)
=== RUN   TestTheRetryNumberCountsThisRoundOnly
--- PASS: TestTheRetryNumberCountsThisRoundOnly (0.05s)
=== RUN   TestCloseCancelsTheBackoffWait
--- PASS: TestCloseCancelsTheBackoffWait (0.06s)
=== RUN   TestTheCachePathIsUsedAndSurvivesClose
--- PASS: TestTheCachePathIsUsedAndSurvivesClose (0.00s)
=== RUN   TestWithoutACachePathTheTempFileIsStillRemoved
--- PASS: TestWithoutACachePathTheTempFileIsStillRemoved (0.00s)
=== RUN   TestTheCompleteCallbackFiresOnlyWhenTheLengthIsKnown
=== RUN   TestTheCompleteCallbackFiresOnlyWhenTheLengthIsKnown/有_Content-Length_就报
=== RUN   TestTheCompleteCallbackFiresOnlyWhenTheLengthIsKnown/不知道有多长就不报
--- PASS: TestTheCompleteCallbackFiresOnlyWhenTheLengthIsKnown (0.21s)
    --- PASS: TestTheCompleteCallbackFiresOnlyWhenTheLengthIsKnown/有_Content-Length_就报 (0.21s)
    --- PASS: TestTheCompleteCallbackFiresOnlyWhenTheLengthIsKnown/不知道有多长就不报 (0.01s)
=== RUN   TestAClosedSourceNeverReportsComplete
--- PASS: TestAClosedSourceNeverReportsComplete (0.01s)
=== RUN   TestTheFrontierIsLedgeredOnCloseAndResumed
--- PASS: TestTheFrontierIsLedgeredOnCloseAndResumed (0.00s)
=== RUN   TestABogusResumeStartsFresh
--- PASS: TestABogusResumeStartsFresh (0.00s)
=== RUN   TestAResumeOnDifferentBytesStartsFresh
[probe] rangeStarts=[0 0] gotLen=65536
[probe] got[0:8]=[255 248 241 234 227 220 213 206] fresh[0:8]=[255 248 241 234 227 220 213 206]
[probe] got[32768:32776]=[130 137 144 151 158 165 172 179] fresh[32768:32776]=[130 137 144 151 158 165 172 179] old[32768:32776]=[130 137 144 151 158 165 172 179]
--- PASS: TestAResumeOnDifferentBytesStartsFresh (0.00s)
=== RUN   TestAStaleDoneMarkerDoesNotBlockTheNextGeneration
--- PASS: TestAStaleDoneMarkerDoesNotBlockTheNextGeneration (0.00s)
=== RUN   TestALedgerThatEqualsTheWholeFileIsNotAResumePoint
--- PASS: TestALedgerThatEqualsTheWholeFileIsNotAResumePoint (0.00s)
=== RUN   TestTheTrailingMoovIsFetchedInParallel
--- PASS: TestTheTrailingMoovIsFetchedInParallel (0.15s)
=== RUN   TestTheTailIsFetchedEvenWhenTheBoxHeaderIsFarAway
--- PASS: TestTheTailIsFetchedEvenWhenTheBoxHeaderIsFarAway (1.41s)
=== RUN   TestTheTrailingMoovIsNotFetchedWhenItIsAlreadyAtTheFront
--- PASS: TestTheTrailingMoovIsNotFetchedWhenItIsAlreadyAtTheFront (0.41s)
=== RUN   TestSourceDeliversBytesBeforeTheDownloadFinishes
--- PASS: TestSourceDeliversBytesBeforeTheDownloadFinishes (0.00s)
=== RUN   TestSourceSeekEndLearnsTheLengthFromContentLength
--- PASS: TestSourceSeekEndLearnsTheLengthFromContentLength (0.00s)
=== RUN   TestRefetchContinuesFromTheSameByte
--- PASS: TestRefetchContinuesFromTheSameByte (0.03s)
=== RUN   TestRefetchTriesBackupURLsFirst
--- PASS: TestRefetchTriesBackupURLsFirst (0.02s)
=== RUN   TestRefetchRefusesAStreamOfAnotherLength
--- PASS: TestRefetchRefusesAStreamOfAnotherLength (0.02s)
=== RUN   TestSourceRecoversWhenTheServerIgnoresRange
--- PASS: TestSourceRecoversWhenTheServerIgnoresRange (0.02s)
=== RUN   TestAnExpiredURLSaysSoRatherThanTalkingAboutRanges
--- PASS: TestAnExpiredURLSaysSoRatherThanTalkingAboutRanges (0.02s)
=== RUN   TestTheStreamSaysWhyItStopped
--- PASS: TestTheStreamSaysWhyItStopped (0.02s)
=== RUN   TestAFinishedStreamIsNotADeadStream
--- PASS: TestAFinishedStreamIsNotADeadStream (0.00s)
=== RUN   TestRefetchRefusesAStreamOfAnotherLengthEvenWhenNobodySaidItsSize
--- PASS: TestRefetchRefusesAStreamOfAnotherLengthEvenWhenNobodySaidItsSize (0.15s)
=== RUN   TestTheLengthGuardSurvivesASecondRefresh
--- PASS: TestTheLengthGuardSurvivesASecondRefresh (0.15s)
=== RUN   TestCloseUnblocksAReaderThatIsWaiting
--- PASS: TestCloseUnblocksAReaderThatIsWaiting (0.10s)
=== RUN   TestCloseRemovesTheCacheFileAndJoinsEveryGoroutine
--- PASS: TestCloseRemovesTheCacheFileAndJoinsEveryGoroutine (0.00s)
=== RUN   TestWatchdogCutsADownloadThatStopsMakingProgress
--- PASS: TestWatchdogCutsADownloadThatStopsMakingProgress (0.77s)
=== RUN   TestSeekCanGoBackwards
--- PASS: TestSeekCanGoBackwards (0.00s)
=== RUN   TestRefetchReportsTheNewQuality
--- PASS: TestRefetchReportsTheNewQuality (0.02s)
=== RUN   TestNewStreamSourceRejectsWhatItCannotStart
--- PASS: TestNewStreamSourceRejectsWhatItCannotStart (0.00s)
=== RUN   TestDisabledSpectrumPassesAudioWithoutBuildingHistory
--- PASS: TestDisabledSpectrumPassesAudioWithoutBuildingHistory (0.00s)
=== RUN   TestTheTapIsTransparent
--- PASS: TestTheTapIsTransparent (0.00s)
=== RUN   TestEachBlockIsTaggedWithItsSourceFrames
--- PASS: TestEachBlockIsTaggedWithItsSourceFrames (0.00s)
=== RUN   TestSeekClearsTheHistory
--- PASS: TestSeekClearsTheHistory (0.00s)
=== RUN   TestADroppedBlocksSpectrumIsNeverOverwritten
--- PASS: TestADroppedBlocksSpectrumIsNeverOverwritten (0.02s)
=== RUN   TestTheRingKeepsAboutFourSeconds
--- PASS: TestTheRingKeepsAboutFourSeconds (0.00s)
=== RUN   TestTheTapFollowsTheVolume
--- PASS: TestTheTapFollowsTheVolume (0.00s)
=== RUN   TestThePlayerAsksTheTapForTheAudibleFrame
--- PASS: TestThePlayerAsksTheTapForTheAudibleFrame (0.00s)
=== RUN   TestBarsWithNothingDecodedYetAreZero
--- PASS: TestBarsWithNothingDecodedYetAreZero (0.00s)
=== RUN   TestTheBarsAreTwoPixelsTallWhenSilent
--- PASS: TestTheBarsAreTwoPixelsTallWhenSilent (0.00s)
=== RUN   TestOggVorbisReallyDecodes
--- PASS: TestOggVorbisReallyDecodes (0.00s)
=== RUN   TestTheOggDurationIsProbedFromItsOwnContainer
--- PASS: TestTheOggDurationIsProbedFromItsOwnContainer (0.00s)
PASS
ok  	github.com/ShellMonster/PudMusic/internal/service/audio	9.472s

@ShellMonster
ShellMonster marked this pull request as ready for review November 19, 2026 04:22
@codeant-ai

codeant-ai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  #f69d8 Reviewed your PR ae33b3f Nov 19, 2026 · 04:22 04:34

@codeant-ai

codeant-ai Bot commented Nov 19, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files label Nov 19, 2026
@ShellMonster
ShellMonster merged commit 0259e7b into main Nov 19, 2026
9 checks passed
Comment on lines +223 to +230
output := C.AMediaCodec_getOutputBuffer(c.codec, index, nil)
if output == nil || size < 0 || size%(2*c.chans) != 0 {
readErr = fmt.Errorf("mfadec: Android AAC: invalid %d-byte MediaCodec PCM buffer", size)
} else {
pcm := unsafe.Slice((*byte)(unsafe.Pointer(output)), size)
for sample := 0; sample < len(pcm); sample += 2 {
c.pcm = append(c.pcm, float32(int16(binary.LittleEndian.Uint16(pcm[sample:])))/32768)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: AMediaCodecBufferInfo.offset is ignored, so codecs that place PCM later in the output buffer decode bytes before the valid range and produce corrupted audio.

Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Logic error

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** internal/service/audio/mfadec/open_android.go
**Line:** 223:230
**Comment:**
	*Logic Error: `AMediaCodecBufferInfo.offset` is ignored, so codecs that place PCM later in the output buffer decode bytes before the valid range and produce corrupted audio.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment on lines +545 to +550
if stored.Password != "" && draft.user == stored.Username &&
strings.Trim(strings.TrimSpace(draft.host), "[]") == stored.Host && stored.Port != nil &&
strings.TrimSpace(draft.port) == strconv.Itoa(*stored.Port) && draft.kind == stored.Type {
secretHint = "留空保留已保存的密码"
savedSecret = stored.Password
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: stored.Type becomes direct or system while draft.kind remains custom, so this guard drops the saved password and the next blank-password save erases it.

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes · 🏷️ Incorrect condition logic

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** internal/mobileui/settings.go
**Line:** 545:550
**Comment:**
	*Incorrect Condition Logic: `stored.Type` becomes direct or system while `draft.kind` remains custom, so this guard drops the saved password and the next blank-password save erases it.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎


func (s *shell) playerProgress(c *ui.Context, state app.State) {
if state.Duration > 0 {
s.player.seek = float64(state.Position) / float64(state.Duration)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Each render resets seek to the live playhead, so playback updates overwrite the user’s slider drag and make seeking jump while playing.

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes · 🏷️ Logic error

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** internal/mobileui/player.go
**Line:** 328:328
**Comment:**
	*Logic Error: Each render resets `seek` to the live playhead, so playback updates overwrite the user’s slider drag and make seeking jump while playing.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Duration: n.Duration.Seconds(), Position: n.Position.Seconds(), Rate: n.Rate,
ArtworkURL: n.ArtworkURL, Artwork: p.artwork,
}
p.dirty = false

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: dirty is cleared before the native call; if publishing fails, this snapshot is discarded, and an unchanged paused or stopped state may never be sent again.

Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Possible bug

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** internal/media/platform_mobile.go
**Line:** 116:116
**Comment:**
	*Possible Bug: `dirty` is cleared before the native call; if publishing fails, this snapshot is discarded, and an unchanged paused or stopped state may never be sent again.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

.setAudioAttributes(attributes)
.setWillPauseWhenDucked(true)
.setOnAudioFocusChangeListener { change ->
if (change < 0 && state == "playing") command("pause")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: After transient focus loss, playback is paused and the request is abandoned; the later focus gain is ignored, leaving playback paused after the interruption.

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes · 🏷️ Logic error

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** internal/media/android/NowPlaying.kt
**Line:** 148:148
**Comment:**
	*Logic Error: After transient focus loss, playback is paused and the request is abandoned; the later focus gain is ignored, leaving playback paused after the interruption.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment thread internal/app/media.go

func (a *App) startPlayer(p *audio.Player) bool {
a.mu.Lock()
gate, intent := a.beforePlayback, a.PlaybackIntent()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The intent is sampled after Play begins; a Pause between its intent increment and this snapshot becomes the baseline, so the stale Play proceeds and starts audio after Pause.

Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Race condition

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** internal/app/media.go
**Line:** 193:193
**Comment:**
	*Race Condition: The intent is sampled after `Play` begins; a Pause between its intent increment and this snapshot becomes the baseline, so the stale Play proceeds and starts audio after Pause.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment on lines +515 to +518
if !l.settled.CompareAndSwap(false, true) || ctx.Err() != nil {
if err != nil {
return ErrStaleGeneration
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: If cancellation lands while Save returns an error after replacing the session file, this exits without rollback, leaving canceled login credentials persisted despite ErrStaleGeneration.

Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Missing cleanup

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** internal/app/credentials.go
**Line:** 515:518
**Comment:**
	*Missing Cleanup: If cancellation lands while `Save` returns an error after replacing the session file, this exits without rollback, leaving canceled login credentials persisted despite `ErrStaleGeneration`.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment on lines +116 to +118
rgba[0] = color_byte((light + 459*cr + 128) >> 8);
rgba[1] = color_byte((light - 55*cb - 136*cr + 128) >> 8);
rgba[2] = color_byte((light + 541*cb + 128) >> 8);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: These coefficients assume BT.709 for every YUV stream, so BT.601 tracks are converted with the wrong matrix and display inaccurate colors.

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes · 🏷️ Logic error

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** internal/service/video/open_android.go
**Line:** 116:118
**Comment:**
	*Logic Error: These coefficients assume BT.709 for every YUV stream, so BT.601 tracks are converted with the wrong matrix and display inaccurate colors.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@codeant-ai

codeant-ai Bot commented Nov 19, 2026

Copy link
Copy Markdown

CodeAnt  CodeAnt Nitpicks

9 code suggestions

1. openLocal marks playback active before this call. If Pause changes the intent while the audio-focus gate waits, this returns without correcting the state, so the app reports playback when audio never started.

Race condition · internal/app/app.go:1738


2. An account switch after this check but before send can reseed the shared client, so the write uses the new account's cookies; the later check only reports stale afterward.

Race condition · internal/app/comment_write.go:49-58


3. p.latest = n accepts snapshots in lock-acquisition order, not creation order; concurrent publishes can leave system controls showing an older track or playback state.

Race condition · internal/media/platform_mobile.go:75


4. An in-flight reply fetch remains valid for this slot and generation, so its older response can repopulate the cache after deletion and hide the newly posted reply.

Cache · internal/app/comment_write.go:17-19


5. Successful likes leave cached comments unchanged, so their old liked state and count can reappear when the UI's temporary like state is lost, such as after restart.

Cache · internal/app/comment_write.go:28-32


6. This test leaves session.enc absent, so it never exercises the unreadable-existing-key recovery path and can pass even if Android restore recovery breaks.

Code quality · internal/app/credentials_sealed_test.go:85


7. If Android denies audio focus, startPlayer returns false after this branch announced playback; screen-reader users are told the song started when it did not.

Logic error · internal/app/online.go:1656


8. SetLocalRoots already rescans when roots change, so the following call queues a second full scan on first entry with changed roots.

Performance · internal/mobileui/library_local.go:36-37


9. history.dirty is cleared before saving, and write failures are discarded, so failed writes permanently lose search-history changes.

Logic error · internal/mobileui/search.go:247-258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant