Skip to content

Commit

Permalink
Move init/shutdown to private
Browse files Browse the repository at this point in the history
  • Loading branch information
mthrok committed Jun 11, 2020
1 parent c311db6 commit 2187348
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions torchaudio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
EncodingInfo,
)
from torchaudio.sox_effects import (
init_sox_effects as _init_sox_effects,
shutdown_sox_effects as _shutdown_sox_effects,
_init_sox_effects,
_shutdown_sox_effects,
)

try:
Expand Down
6 changes: 3 additions & 3 deletions torchaudio/sox_effects/sox_effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


@_mod_utils.requires_module('torchaudio._torchaudio')
def init_sox_effects() -> int:
def _init_sox_effects() -> int:
"""Initialize resources required to use ``SoxEffectsChain``
You do not need to call this function manually. It is called automatically.
Expand All @@ -50,13 +50,13 @@ def init_sox_effects() -> int:
code = _torchaudio.initialize_sox()
if code == _SOX_SUCCESS_CODE:
_SOX_INITIALIZED = True
atexit.register(shutdown_sox_effects)
atexit.register(_shutdown_sox_effects)
return code
return _SOX_SUCCESS_CODE


@_mod_utils.requires_module("torchaudio._torchaudio")
def shutdown_sox_effects() -> int:
def _shutdown_sox_effects() -> int:
"""Clean up resources required to use ``SoxEffectsChain``
You do not need to call this function manually. It is called automatically.
Expand Down

0 comments on commit 2187348

Please sign in to comment.