+
    Wi                     *    R t ^ RIt^RIHt R R ltR# )z:Functions to play audio on Windows using native win32 APIsN)pr_errc                (    V ^8  d   QhR\         RR/# )   	mp3_fnamereturnNstr)formats   "[/home/ubuntu/hermes-agent/venv/lib/python3.14/site-packages/edge_playback/win32_playback.py__annotate__r      s     , ,c ,d ,    c                  aaa \         P                  R8w  d   \        R4      h^ RIHoHpHp VP                  P                  oVP                  VP                  VP                  .Sn        VP                  Sn        R VV3R llpVP                  P                  oR V3R llpV! V 4      pV! R4       V! R	V R
24       V! R4       V! R4       R# )z-Play mp3 file with given path using win32 APIwin32z"Function only available on Windows)create_unicode_bufferwindllwintypesc                0    V ^8  d   QhR\         R\         /# )r   	long_namer   r   )r	   s   "r
   r   $play_mp3_win32.<locals>.__annotate__   s     % %s %s %r   c                X   < ^ p S! V4      pS! WV4      pW8  d   VP                   # TpK(  )zd
Gets the DOS-safe short path name of a given long path.
http://stackoverflow.com/a/23598461/200291
)value)r   output_buf_size
output_bufneeded_get_short_path_name_wr   s   &   r
   get_short_path_name+play_mp3_win32.<locals>.get_short_path_name   s:    
 .?J+I?SF(!'''$Or   c                (    V ^8  d   QhR\         RR/# )r   msgr   Nr   )r	   s   "r
   r   r   (   s      c d r   c                   < S! V ^ ^ ^ 4      pV^ 8w  d+   \        RV RV  R24       \        P                  ! ^4       R# R# )zSend MCI command stringzError z in mciSendString z
. Exiting.N)r   sysexit)r   resultmci_send_string_ws   & r
   mci_send play_mp3_win32.<locals>.mci_send(   sB    "31a0Q;VF8#5cU*EFHHQK r   z	Close AllzOpen "z" Type MPEGVideo Alias theMP3zPlay theMP3 WaitzClose theMP3N)r    platformNotImplementedErrorctypesr   r   r   kernel32GetShortPathNameWLPCWSTRLPWSTRDWORDargtypesrestypewinmmmciSendStringW)	r   r   r   r   r$   mp3_shortnamer   r   r#   s	   &     @@@r
   play_mp3_win32r3      s     ||w!"FGG ?>#__>>'#
 &.^^"% % 33  (	2M[vm_$ABC ^r   )__doc__r    utilr   r3    r   r
   <module>r7      s    @ 
 ,r   