from datetime import timedelta
from pathlib import Path
from typing import Self
from pyautd3 import SamplingConfig
from pyautd3.derive import datagram
from pyautd3.derive import modulation
from pyautd3.derive.derive_datagram import datagram_with_segment
from pyautd3.driver.datagram.modulation import Modulation
from pyautd3.driver.defined.freq import Freq
from pyautd3.modulation.resample import Resampler
from pyautd3.native_methods.autd3capi_driver import ModulationPtr
from pyautd3.native_methods.autd3capi_modulation_audio_file import NativeMethods as ModulationAudioFile
from pyautd3.native_methods.utils import _to_null_terminated_utf8
from pyautd3.native_methods.utils import _validate_ptr
from pyautd3.modulation.cache import Cache
from pyautd3.modulation.fir import Fir
from collections.abc import Iterable
from pyautd3.modulation.radiation_pressure import RadiationPressure
from datetime import timedelta
from pyautd3.driver.datagram.with_timeout import DatagramWithTimeout
from pyautd3.driver.datagram.with_parallel_threshold import DatagramWithParallelThreshold
from pyautd3.native_methods.autd3capi_driver import Segment, TransitionModeWrap
from pyautd3.driver.datagram.with_segment import DatagramWithSegment



class Wav(Modulation):
    _path: Path
    _resampler: tuple[SamplingConfig, Resampler] | None
    def __init__(self: Wav, path: Path) -> None: ...
    def _modulation_ptr(self: Wav, ) -> ModulationPtr: ...
    def with_cache(self: Wav, ) -> Cache[Wav]: ...
    def with_fir(self: Wav, iterable: Iterable[float]) -> Fir[Wav]: ...
    def with_radiation_pressure(self: Wav, ) -> RadiationPressure[Wav]: ...
    def with_timeout(self: Wav, timeout: timedelta | None) -> DatagramWithTimeout[Wav]: ...
    def with_parallel_threshold(self: Wav, threshold: int | None) -> DatagramWithParallelThreshold[Wav]: ...
    def with_segment(self: Wav, segment: Segment, transition_mode: TransitionModeWrap | None) -> DatagramWithSegment[Wav]: ...
    @staticmethod
    def new_with_resample(path: Path, target: SamplingConfig | Freq[int] | Freq[float] | timedelta, resampler: Resampler) -> Wav: ...
