Class: MusicBeeIPC
- Inherits:
-
Object
- Object
- MusicBeeIPC
- Defined in:
- lib/musicbeeipc.rb
General collapse
- #clear_now_playing_list ⇒ MBError
- #end_auto_dj ⇒ MBError
- #get_artist_picture(fading_percent) ⇒ String
- #get_artist_picture_thumb ⇒ String
- #get_artist_picture_urls(local_only) ⇒ String
- #get_artwork ⇒ String
- #get_artwork_url ⇒ String
- #get_auto_dj_enabled ⇒ bool
- #get_button_enabled(button) ⇒ bool
- #get_crossfade ⇒ bool
- #get_current_index ⇒ int
- #get_downloaded_artwork ⇒ String
- #get_downloaded_artwork_url ⇒ String
- #get_downloaded_lyrics ⇒ String
- #get_dsp_enabled ⇒ bool
- #get_duration ⇒ int
- #get_equalizer_enabled ⇒ bool
- #get_file_property(file_property) ⇒ String
- #get_file_tag(field) ⇒ String
- #get_file_url ⇒ String
- #get_lyrics ⇒ String
- #get_music_bee_version ⇒ MBMusicBeeVersion
- #get_music_bee_version_str ⇒ String
- #get_music_bee_version_sym ⇒ String
- #get_mute ⇒ bool
- #get_next_index(offset) ⇒ int
- #get_play_state ⇒ MBPlayState
- #get_play_state_str ⇒ String
- #get_play_state_sym ⇒ String
- #get_plugin_version ⇒ Array<int>
- #get_plugin_version_str ⇒ String
- #get_position ⇒ int
- #get_repeat ⇒ MBRepeatMode
- #get_replay_gain_mode ⇒ MBReplayGainMode
- #get_scrobble_enabled ⇒ bool
- #get_show_rating_love ⇒ bool
- #get_show_rating_track ⇒ bool
- #get_show_time_remaining ⇒ bool
- #get_shuffle ⇒ bool
- #get_soundtrack_picture_urls(local_only) ⇒ String
- #get_stop_after_current_enabled ⇒ bool
-
#get_volume ⇒ int
Volume - Value between 0 - 100.
-
#get_volumef ⇒ float
Floating point volume - Value between 0.0 - 1.0.
-
#get_volumep ⇒ int
Precise volume - Value between 0 - 10000.
- #is_any_following_tracks ⇒ bool
- #is_any_prior_tracks ⇒ bool
- #is_soundtrack ⇒ bool
- #jump(index) ⇒ MBError
- #message_box(text, caption) ⇒ MBError
- #move_files(from_indices, to_index) ⇒ MBError
- #next_track ⇒ MBError
- #pause ⇒ MBError
- #play ⇒ MBError
- #play_now(fileurl) ⇒ MBError
- #play_pause ⇒ MBError
- #position ⇒ int
- #position=(position) ⇒ Object
- #previous_track ⇒ MBError
- #probe ⇒ bool
- #queue_last(fileurl) ⇒ MBError
- #queue_next(fileurl) ⇒ MBError
- #queue_random_tracks ⇒ MBError
- #remove_at(index) ⇒ MBError
- #search(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ Array<String>
- #search_and_play_first(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ MBError
- #search_first(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ String
- #search_first_index(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ int
- #search_indices(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ Array<int>
- #set_crossfade(crossfade) ⇒ MBError
- #set_dsp_enabled(enabled) ⇒ MBError
- #set_equalizer_enabled(enabled) ⇒ MBError
- #set_mute(mute) ⇒ MBError
- #set_position(position) ⇒ MBError
- #set_repeat(repeat) ⇒ MBError
- #set_replay_gain_mode(mode) ⇒ MBError
- #set_scrobble_enabled(enabled) ⇒ MBError
- #set_shuffle(shuffle) ⇒ MBError
- #set_stop_after_current_enabled(enabled) ⇒ bool
-
#set_volume(volume) ⇒ MBError
Volume - Value between 0 - 100.
-
#set_volumef(volume) ⇒ MBError
Floating point volume - Value between 0.0 - 1.0.
-
#set_volumep(volume) ⇒ MBError
Precise volume - Value between 0 - 10000.
- #show_equalizer ⇒ MBError
- #show_now_playing_assistant ⇒ MBError
- #start_auto_dj ⇒ MBError
- #stop ⇒ MBError
- #stop_after_current ⇒ MBError
- #test ⇒ MBError
-
#to_byte_array(str) ⇒ Array<uint8>
Converts returned String to byte array.
-
#to_bytes(str) ⇒ String
Converts returned String to bytes.
-
#volume ⇒ int
Volume - Value between 0 - 100.
-
#volume=(volume) ⇒ Object
Volume - Value between 0 - 100.
-
#volumef ⇒ float
Floating point volume - Value between 0.0 - 1.0.
-
#volumef=(volume) ⇒ Object
Floating point volume - Value between 0.0 - 1.0.
-
#volumep ⇒ int
Precise volume - Value between 0 - 10000.
-
#volumep=(volume) ⇒ Object
Precise volume - Value between 0 - 10000.
Now Playing List collapse
- #now_playing_list_get_file_property(index, file_property) ⇒ String
- #now_playing_list_get_file_tag(index, field) ⇒ String
- #now_playing_list_get_item_count ⇒ int
- #now_playing_list_get_list_file_url(index) ⇒ String
- #now_playing_list_play_library_shuffled ⇒ MBError
- #now_playing_list_query_files(query) ⇒ MBError
- #now_playing_list_query_files_ex(query) ⇒ Array<String>
- #now_playing_list_query_get_all_files ⇒ String
- #now_playing_list_query_get_next_file ⇒ String
Playlist collapse
- #playlist_append_files(playlist_url, filenames) ⇒ MBError
- #playlist_create_playlist(folder_name, playlist_name, filenames) ⇒ String
- #playlist_delete_playlist(playlist_url) ⇒ MBError
- #playlist_get_item_count(playlist_url) ⇒ int
- #playlist_get_name(playlist_url) ⇒ String
- #playlist_get_type(playlist_url) ⇒ MBPlaylistFormat
- #playlist_is_in_list(playlist_url, filename) ⇒ bool
- #playlist_move_files(playlist_url, from_indices, to_index) ⇒ MBError
- #playlist_play_now(playlist_url) ⇒ MBError
- #playlist_query_files(playlist_url) ⇒ MBError
- #playlist_query_files_ex(playlist_url) ⇒ Array<String>
- #playlist_query_get_all_files ⇒ String
- #playlist_query_get_next_file ⇒ String
- #playlist_query_get_next_playlist ⇒ String
- #playlist_query_playlists ⇒ MBError
- #playlist_remove_at(playlist_url, index) ⇒ MBError
- #playlist_set_files(playlist_url, filenames) ⇒ MBError
Library collapse
- #library_add_file_to_library(file_url, category) ⇒ String
- #library_commit_tags_to_file(file_url) ⇒ MBError
- #library_get_artist_picture(artist_name, fading_percent, fading_color) ⇒ String
- #library_get_artist_picture_thumb(artist_name) ⇒ String
- #library_get_artist_picture_urls(artist_name, local_only) ⇒ String
- #library_get_artwork(file_url, index) ⇒ String
- #library_get_artwork_url(file_url, index) ⇒ String
- #library_get_file_property(file_url, file_property) ⇒ String
- #library_get_file_tag(file_url, field) ⇒ String
- #library_get_lyrics(file_url, lyrics_type) ⇒ String
- #library_jump(index) ⇒ MBError
- #library_query_files(query) ⇒ MBError
- #library_query_files_ex(query) ⇒ Array<String>
- #library_query_get_all_files ⇒ String
- #library_query_get_lookup_table_value(key) ⇒ Array<String>
- #library_query_get_next_file ⇒ String
- #library_query_lookup_table(key_tags, value_tags, query) ⇒ MBError
- #library_query_similar_artists(artist_name, minimum_artist_similarity_rating) ⇒ MBError
- #library_search(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ Array<String>
- #library_search_and_play_first(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ MBError
- #library_search_first(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ String
- #library_search_first_index(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ int
- #library_search_indices(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ Array<int>
- #library_set_file_tag(file_url, field, value) ⇒ MBError
Setting collapse
Window collapse
- #window_bring_to_front ⇒ MBError
- #window_close ⇒ MBError
- #window_get_handle ⇒ HWND (long)
- #window_get_handle_ptr ⇒ HWND (pointer)
- #window_get_position ⇒ Array<int>
- #window_get_size ⇒ Array<int>
- #window_maximize ⇒ MBError
- #window_minimize ⇒ MBError
- #window_move ⇒ MBError
- #window_resize ⇒ MBError
- #window_restore ⇒ MBError
Instance Method Details
#clear_now_playing_list ⇒ MBError
545 546 547 |
# File 'lib/musicbeeipc.rb', line 545 def () (find_hwnd(), WM_USER, , 0) end |
#end_auto_dj ⇒ MBError
65 66 67 |
# File 'lib/musicbeeipc.rb', line 65 def end_auto_dj() (find_hwnd(), WM_USER, MBC_EndAutoDj, 0) end |
#get_artist_picture(fading_percent) ⇒ String
446 447 448 449 450 451 452 453 454 455 456 |
# File 'lib/musicbeeipc.rb', line 446 def get_artist_picture(fading_percent) hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_GetArtistPicture, fading_percent) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_artist_picture_thumb ⇒ String
473 474 475 476 477 478 479 480 481 482 483 |
# File 'lib/musicbeeipc.rb', line 473 def get_artist_picture_thumb() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_GetArtistPictureThumb, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_artist_picture_urls(local_only) ⇒ String
460 461 462 463 464 465 466 467 468 469 470 |
# File 'lib/musicbeeipc.rb', line 460 def get_artist_picture_urls(local_only) hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_GetArtistPictureUrls, to_i(local_only)) r = unpack_sa(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_artwork ⇒ String
393 394 395 396 397 398 399 400 401 402 403 |
# File 'lib/musicbeeipc.rb', line 393 def get_artwork() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_GetArtwork, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_artwork_url ⇒ String
406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/musicbeeipc.rb', line 406 def get_artwork_url() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_GetArtworkUrl, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_auto_dj_enabled ⇒ bool
276 277 278 |
# File 'lib/musicbeeipc.rb', line 276 def get_auto_dj_enabled() to_b((find_hwnd(), WM_USER, MBC_GetAutoDjEnabled, 0)) end |
#get_button_enabled(button) ⇒ bool
585 586 587 |
# File 'lib/musicbeeipc.rb', line 585 def () to_b((find_hwnd(), WM_USER, MBC_GetButtonEnabled, )) end |
#get_crossfade ⇒ bool
293 294 295 |
# File 'lib/musicbeeipc.rb', line 293 def get_crossfade() to_b((find_hwnd(), WM_USER, MBC_GetCrossfade, 0)) end |
#get_current_index ⇒ int
506 507 508 |
# File 'lib/musicbeeipc.rb', line 506 def get_current_index() (find_hwnd(), WM_USER, MBC_GetCurrentIndex, 0) end |
#get_downloaded_artwork ⇒ String
419 420 421 422 423 424 425 426 427 428 429 |
# File 'lib/musicbeeipc.rb', line 419 def get_downloaded_artwork() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_GetDownloadedArtwork, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_downloaded_artwork_url ⇒ String
432 433 434 435 436 437 438 439 440 441 442 |
# File 'lib/musicbeeipc.rb', line 432 def get_downloaded_artwork_url() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_GetDownloadedArtworkUrl, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_downloaded_lyrics ⇒ String
380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/musicbeeipc.rb', line 380 def get_downloaded_lyrics() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_GetDownloadedLyrics, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_dsp_enabled ⇒ bool
249 250 251 |
# File 'lib/musicbeeipc.rb', line 249 def get_dsp_enabled() to_b((find_hwnd(), WM_USER, MBC_GetDspEnabled, 0)) end |
#get_duration ⇒ int
321 322 323 |
# File 'lib/musicbeeipc.rb', line 321 def get_duration() (find_hwnd(), WM_USER, MBC_GetDuration, 0) end |
#get_equalizer_enabled ⇒ bool
238 239 240 |
# File 'lib/musicbeeipc.rb', line 238 def get_equalizer_enabled() to_b((find_hwnd(), WM_USER, MBC_GetEqualizerEnabled, 0)) end |
#get_file_property(file_property) ⇒ String
340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/musicbeeipc.rb', line 340 def get_file_property(file_property) hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_GetFileProperty, file_property) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_file_tag(field) ⇒ String
354 355 356 357 358 359 360 361 362 363 364 |
# File 'lib/musicbeeipc.rb', line 354 def get_file_tag(field) hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_GetFileTag, field) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_file_url ⇒ String
326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/musicbeeipc.rb', line 326 def get_file_url() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_GetFileUrl, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_lyrics ⇒ String
367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/musicbeeipc.rb', line 367 def get_lyrics() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_GetLyrics, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_music_bee_version ⇒ MBMusicBeeVersion
1369 1370 1371 |
# File 'lib/musicbeeipc.rb', line 1369 def get_music_bee_version() (find_hwnd(), WM_USER, MBC_MusicBeeVersion, 0) end |
#get_music_bee_version_str ⇒ String
1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 |
# File 'lib/musicbeeipc.rb', line 1374 def get_music_bee_version_str() case (find_hwnd(), WM_USER, MBC_MusicBeeVersion, 0) when MBMBV_v2_0 "2.0" when MBMBV_v2_1 "2.1" when MBMBV_v2_2 "2.2" when MBMBV_v2_3 "2.3" else "Unknown" end end |
#get_music_bee_version_sym ⇒ String
1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 |
# File 'lib/musicbeeipc.rb', line 1390 def get_music_bee_version_sym() case (find_hwnd(), WM_USER, MBC_MusicBeeVersion, 0) when MBMBV_v2_0 :v2_0 when MBMBV_v2_1 :v2_1 when MBMBV_v2_2 :v2_2 when MBMBV_v2_3 :v2_3 else :Unknown end end |
#get_mute ⇒ bool
205 206 207 |
# File 'lib/musicbeeipc.rb', line 205 def get_mute() to_b((find_hwnd(), WM_USER, MBC_GetMute, 0)) end |
#get_next_index(offset) ⇒ int
512 513 514 |
# File 'lib/musicbeeipc.rb', line 512 def get_next_index(offset) (find_hwnd(), WM_USER, MBC_GetNextIndex, offset) end |
#get_play_state ⇒ MBPlayState
70 71 72 |
# File 'lib/musicbeeipc.rb', line 70 def get_play_state() (find_hwnd(), WM_USER, MBC_GetPlayState, 0) end |
#get_play_state_str ⇒ String
75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/musicbeeipc.rb', line 75 def get_play_state_str() case (find_hwnd(), WM_USER, MBC_GetPlayState, 0) when MBPS_Loading "Loading" when "Playing" when MBPS_Paused "Paused" when MBPS_Stopped "Stopped" else "Undefined" end end |
#get_play_state_sym ⇒ String
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/musicbeeipc.rb', line 91 def get_play_state_sym() case (find_hwnd(), WM_USER, MBC_GetPlayState, 0) when MBPS_Loading :Loading when :Playing when MBPS_Paused :Paused when MBPS_Stopped :Stopped else :Undefined end end |
#get_plugin_version ⇒ Array<int>
1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 |
# File 'lib/musicbeeipc.rb', line 1419 def get_plugin_version() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_PluginVersion, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r.split(".").map { |s| s.to_i } end |
#get_plugin_version_str ⇒ String
1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 |
# File 'lib/musicbeeipc.rb', line 1406 def get_plugin_version_str() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_PluginVersion, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_position ⇒ int
107 108 109 |
# File 'lib/musicbeeipc.rb', line 107 def get_position() (find_hwnd(), WM_USER, MBC_GetPosition, 0) end |
#get_repeat ⇒ MBRepeatMode
227 228 229 |
# File 'lib/musicbeeipc.rb', line 227 def get_repeat() (find_hwnd(), WM_USER, MBC_GetRepeat, 0) end |
#get_replay_gain_mode ⇒ MBReplayGainMode
304 305 306 |
# File 'lib/musicbeeipc.rb', line 304 def get_replay_gain_mode() (find_hwnd(), WM_USER, MBC_GetReplayGainMode, 0) end |
#get_scrobble_enabled ⇒ bool
260 261 262 |
# File 'lib/musicbeeipc.rb', line 260 def get_scrobble_enabled() to_b((find_hwnd(), WM_USER, MBC_GetScrobbleEnabled, 0)) end |
#get_show_rating_love ⇒ bool
579 580 581 |
# File 'lib/musicbeeipc.rb', line 579 def () to_b((find_hwnd(), WM_USER, MBC_GetShowRatingLove, 0)) end |
#get_show_rating_track ⇒ bool
574 575 576 |
# File 'lib/musicbeeipc.rb', line 574 def () to_b((find_hwnd(), WM_USER, MBC_GetShowRatingTrack, 0)) end |
#get_show_time_remaining ⇒ bool
569 570 571 |
# File 'lib/musicbeeipc.rb', line 569 def get_show_time_remaining() to_b((find_hwnd(), WM_USER, MBC_GetShowTimeRemaining, 0)) end |
#get_shuffle ⇒ bool
216 217 218 |
# File 'lib/musicbeeipc.rb', line 216 def get_shuffle() to_b((find_hwnd(), WM_USER, MBC_GetShuffle, 0)) end |
#get_soundtrack_picture_urls(local_only) ⇒ String
492 493 494 495 496 497 498 499 500 501 502 503 |
# File 'lib/musicbeeipc.rb', line 492 def get_soundtrack_picture_urls(local_only) hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_GetSoundtrackPictureUrls, to_i(local_only)) r = unpack_sa(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#get_stop_after_current_enabled ⇒ bool
281 282 283 |
# File 'lib/musicbeeipc.rb', line 281 def get_stop_after_current_enabled() to_b((find_hwnd(), WM_USER, MBC_GetStopAfterCurrentEnabled, 0)) end |
#get_volume ⇒ int
Volume - Value between 0 - 100
129 130 131 |
# File 'lib/musicbeeipc.rb', line 129 def get_volume() (find_hwnd(), WM_USER, MBC_GetVolume, 0) end |
#get_volumef ⇒ float
Floating point volume - Value between 0.0 - 1.0
179 180 181 |
# File 'lib/musicbeeipc.rb', line 179 def get_volumef() FloatInt.new(i:(find_hwnd(), WM_USER, MBC_GetVolumef, 0))[:f] end |
#get_volumep ⇒ int
Precise volume - Value between 0 - 10000
154 155 156 |
# File 'lib/musicbeeipc.rb', line 154 def get_volumep() (find_hwnd(), WM_USER, MBC_GetVolumep, 0) end |
#is_any_following_tracks ⇒ bool
522 523 524 |
# File 'lib/musicbeeipc.rb', line 522 def is_any_following_tracks() to_b((find_hwnd(), WM_USER, MBC_IsAnyFollowingTracks, 0)) end |
#is_any_prior_tracks ⇒ bool
517 518 519 |
# File 'lib/musicbeeipc.rb', line 517 def is_any_prior_tracks() to_b((find_hwnd(), WM_USER, MBC_IsAnyPriorTracks, 0)) end |
#is_soundtrack ⇒ bool
486 487 488 |
# File 'lib/musicbeeipc.rb', line 486 def is_soundtrack() to_b((find_hwnd(), WM_USER, MBC_IsSoundtrack, 0)) end |
#jump(index) ⇒ MBError
591 592 593 |
# File 'lib/musicbeeipc.rb', line 591 def jump(index) (find_hwnd(), WM_USER, MBC_Jump, index) end |
#library_add_file_to_library(file_url, category) ⇒ String
1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 |
# File 'lib/musicbeeipc.rb', line 1094 def library_add_file_to_library(file_url, category) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_AddFileToLibrary, pack_si(file_url, category)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_commit_tags_to_file(file_url) ⇒ MBError
990 991 992 993 |
# File 'lib/musicbeeipc.rb', line 990 def (file_url) (find_hwnd(), WM_COPYDATA, MBC_Library_CommitTagsToFile, pack_s(file_url)) end |
#library_get_artist_picture(artist_name, fading_percent, fading_color) ⇒ String
1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 |
# File 'lib/musicbeeipc.rb', line 1047 def library_get_artist_picture(artist_name, fading_percent, fading_color) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_GetArtistPicture, pack_si(artist_name, fading_percent, fading_color)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_get_artist_picture_thumb(artist_name) ⇒ String
1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 |
# File 'lib/musicbeeipc.rb', line 1078 def library_get_artist_picture_thumb(artist_name) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_GetArtistPictureThumb, pack_s(artist_name)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_get_artist_picture_urls(artist_name, local_only) ⇒ String
1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 |
# File 'lib/musicbeeipc.rb', line 1063 def library_get_artist_picture_urls(artist_name, local_only) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_GetArtistPictureUrls, pack_sb(artist_name, local_only)) r = unpack_sa(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_get_artwork(file_url, index) ⇒ String
1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 |
# File 'lib/musicbeeipc.rb', line 1014 def library_get_artwork(file_url, index) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_GetArtwork, pack_si(file_url, index)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_get_artwork_url(file_url, index) ⇒ String
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 |
# File 'lib/musicbeeipc.rb', line 1030 def library_get_artwork_url(file_url, index) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_GetArtworkUrl, pack_si(file_url, index)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_get_file_property(file_url, file_property) ⇒ String
950 951 952 953 954 955 956 957 958 959 960 961 |
# File 'lib/musicbeeipc.rb', line 950 def library_get_file_property(file_url, file_property) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_GetFileProperty, pack_si(file_url, file_property)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_get_file_tag(file_url, field) ⇒ String
966 967 968 969 970 971 972 973 974 975 976 977 |
# File 'lib/musicbeeipc.rb', line 966 def library_get_file_tag(file_url, field) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_GetFileTag, pack_si(file_url, field)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_get_lyrics(file_url, lyrics_type) ⇒ String
998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 |
# File 'lib/musicbeeipc.rb', line 998 def library_get_lyrics(file_url, lyrics_type) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_GetLyrics, pack_si(file_url, lyrics_type)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_jump(index) ⇒ MBError
1189 1190 1191 |
# File 'lib/musicbeeipc.rb', line 1189 def library_jump(index) (find_hwnd(), WM_USER, MBC_Library_Jump, index) end |
#library_query_files(query) ⇒ MBError
1109 1110 1111 1112 |
# File 'lib/musicbeeipc.rb', line 1109 def library_query_files(query) (find_hwnd(), WM_COPYDATA, MBC_Library_QueryFiles, pack_s(query)) end |
#library_query_files_ex(query) ⇒ Array<String>
1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 |
# File 'lib/musicbeeipc.rb', line 1142 def library_query_files_ex(query) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_QueryFilesEx, pack_s(query)) r = unpack_sa(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_query_get_all_files ⇒ String
1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
# File 'lib/musicbeeipc.rb', line 1128 def library_query_get_all_files() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_Library_QueryGetAllFiles, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_query_get_lookup_table_value(key) ⇒ Array<String>
1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 |
# File 'lib/musicbeeipc.rb', line 1174 def library_query_get_lookup_table_value(key) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_QueryGetLookupTableValue, pack_s(key)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_query_get_next_file ⇒ String
1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 |
# File 'lib/musicbeeipc.rb', line 1115 def library_query_get_next_file() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_Library_QueryGetNextFile, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_query_lookup_table(key_tags, value_tags, query) ⇒ MBError
1167 1168 1169 1170 |
# File 'lib/musicbeeipc.rb', line 1167 def library_query_lookup_table(, , query) (find_hwnd(), WM_COPYDATA, MBC_Library_QueryLookupTable, pack_s(, , query)) end |
#library_query_similar_artists(artist_name, minimum_artist_similarity_rating) ⇒ MBError
1158 1159 1160 1161 |
# File 'lib/musicbeeipc.rb', line 1158 def library_query_similar_artists(artist_name, ) (find_hwnd(), WM_COPYDATA, MBC_Library_QueryLookupTable, pack_sd(artist_name, )) end |
#library_search(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ Array<String>
1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 |
# File 'lib/musicbeeipc.rb', line 1197 def library_search(query, comparison="Contains", fields=["ArtistPeople", "Title", "Album"]) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_Search, pack_sssa(query, comparison, fields)) r = unpack_sa(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_search_and_play_first(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ MBError
1261 1262 1263 1264 1265 |
# File 'lib/musicbeeipc.rb', line 1261 def library_search_and_play_first(query, comparison="Contains", fields=["ArtistPeople", "Title", "Album"]) (find_hwnd(), WM_COPYDATA, MBC_Library_SearchAndPlayFirst, pack_sssa(query, comparison, fields)) end |
#library_search_first(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ String
1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 |
# File 'lib/musicbeeipc.rb', line 1215 def library_search_first(query, comparison="Contains", fields=["ArtistPeople", "Title", "Album"]) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_SearchFirst, pack_sssa(query, comparison, fields)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_search_first_index(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ int
1251 1252 1253 1254 1255 |
# File 'lib/musicbeeipc.rb', line 1251 def library_search_first_index(query, comparison="Contains", fields=["ArtistPeople", "Title", "Album"]) (find_hwnd(), WM_COPYDATA, MBC_Library_SearchFirstIndex, pack_sssa(query, comparison, fields)) end |
#library_search_indices(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ Array<int>
1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 |
# File 'lib/musicbeeipc.rb', line 1233 def library_search_indices(query, comparison="Contains", fields=["ArtistPeople", "Title", "Album"]) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Library_SearchIndices, pack_sssa(query, comparison, fields)) r = unpack_ia(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#library_set_file_tag(file_url, field, value) ⇒ MBError
983 984 985 986 |
# File 'lib/musicbeeipc.rb', line 983 def library_set_file_tag(file_url, field, value) (find_hwnd(), WM_COPYDATA, MBC_Library_SetFileTag, pack_sis(file_url, field, value)) end |
#message_box(text, caption) ⇒ MBError
1439 1440 1441 1442 |
# File 'lib/musicbeeipc.rb', line 1439 def (text, caption) (find_hwnd(), WM_COPYDATA, MBC_MessageBox, pack_s(text, caption)) end |
#move_files(from_indices, to_index) ⇒ MBError
558 559 560 561 |
# File 'lib/musicbeeipc.rb', line 558 def move_files(from_indices, to_index) (find_hwnd(), WM_COPYDATA, MBC_MoveFiles, pack_iai(from_indices, to_index)) end |
#next_track ⇒ MBError
55 56 57 |
# File 'lib/musicbeeipc.rb', line 55 def next_track() (find_hwnd(), WM_USER, MBC_NextTrack, 0) end |
#now_playing_list_get_file_property(index, file_property) ⇒ String
688 689 690 691 692 693 694 695 696 697 698 699 |
# File 'lib/musicbeeipc.rb', line 688 def (index, file_property) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, , pack_i(index, file_property)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#now_playing_list_get_file_tag(index, field) ⇒ String
704 705 706 707 708 709 710 711 712 713 714 715 |
# File 'lib/musicbeeipc.rb', line 704 def (index, field) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, , pack_i(index, field)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#now_playing_list_get_item_count ⇒ int
772 773 774 |
# File 'lib/musicbeeipc.rb', line 772 def () (find_hwnd(), WM_USER, , 0) end |
#now_playing_list_get_list_file_url(index) ⇒ String
673 674 675 676 677 678 679 680 681 682 683 |
# File 'lib/musicbeeipc.rb', line 673 def (index) hwnd = find_hwnd() lr = (hwnd, WM_USER, , index) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#now_playing_list_play_library_shuffled ⇒ MBError
766 767 768 769 |
# File 'lib/musicbeeipc.rb', line 766 def () (find_hwnd(), WM_USER, , 0) end |
#now_playing_list_query_files(query) ⇒ MBError
719 720 721 722 |
# File 'lib/musicbeeipc.rb', line 719 def (query) (find_hwnd(), WM_COPYDATA, , pack_s(query)) end |
#now_playing_list_query_files_ex(query) ⇒ Array<String>
752 753 754 755 756 757 758 759 760 761 762 763 |
# File 'lib/musicbeeipc.rb', line 752 def (query) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, , pack_s(query)) r = unpack_sa(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#now_playing_list_query_get_all_files ⇒ String
738 739 740 741 742 743 744 745 746 747 748 |
# File 'lib/musicbeeipc.rb', line 738 def () hwnd = find_hwnd() lr = (hwnd, WM_USER, , 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#now_playing_list_query_get_next_file ⇒ String
725 726 727 728 729 730 731 732 733 734 735 |
# File 'lib/musicbeeipc.rb', line 725 def () hwnd = find_hwnd() lr = (hwnd, WM_USER, , 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#pause ⇒ MBError
35 36 37 |
# File 'lib/musicbeeipc.rb', line 35 def pause() (find_hwnd(), WM_USER, MBC_Pause, 0) end |
#play ⇒ MBError
30 31 32 |
# File 'lib/musicbeeipc.rb', line 30 def play() (find_hwnd(), WM_USER, MBC_Play, 0) end |
#play_now(fileurl) ⇒ MBError
528 529 530 |
# File 'lib/musicbeeipc.rb', line 528 def play_now(fileurl) (find_hwnd(), WM_COPYDATA, MBC_PlayNow, pack_s(fileurl)) end |
#play_pause ⇒ MBError
25 26 27 |
# File 'lib/musicbeeipc.rb', line 25 def play_pause() (find_hwnd(), WM_USER, MBC_PlayPause, 0) end |
#playlist_append_files(playlist_url, filenames) ⇒ MBError
909 910 911 912 |
# File 'lib/musicbeeipc.rb', line 909 def playlist_append_files(playlist_url, filenames) (find_hwnd(), WM_COPYDATA, MBC_Playlist_AppendFiles, pack_ssa(playlist_url, filenames)) end |
#playlist_create_playlist(folder_name, playlist_name, filenames) ⇒ String
878 879 880 881 882 883 884 885 886 887 888 889 |
# File 'lib/musicbeeipc.rb', line 878 def playlist_create_playlist(folder_name, playlist_name, filenames) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Playlist_CreatePlaylist, pack_sssa(folder_name, playlist_name, filenames)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#playlist_delete_playlist(playlist_url) ⇒ MBError
893 894 895 896 |
# File 'lib/musicbeeipc.rb', line 893 def playlist_delete_playlist(playlist_url) (find_hwnd(), WM_COPYDATA, MBC_Playlist_DeletePlaylist, pack_s(playlist_url)) end |
#playlist_get_item_count(playlist_url) ⇒ int
940 941 942 943 |
# File 'lib/musicbeeipc.rb', line 940 def playlist_get_item_count(playlist_url) (find_hwnd(), WM_COPYDATA, MBC_Playlist_GetItemCount, pack_s(playlist_url)) end |
#playlist_get_name(playlist_url) ⇒ String
780 781 782 783 784 785 786 787 788 789 790 791 |
# File 'lib/musicbeeipc.rb', line 780 def playlist_get_name(playlist_url) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Playlist_GetName, pack_s(playlist_url)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#playlist_get_type(playlist_url) ⇒ MBPlaylistFormat
795 796 797 798 |
# File 'lib/musicbeeipc.rb', line 795 def playlist_get_type(playlist_url) (find_hwnd(), WM_COPYDATA, MBC_Playlist_GetType, pack_s(playlist_url)) end |
#playlist_is_in_list(playlist_url, filename) ⇒ bool
803 804 805 806 |
# File 'lib/musicbeeipc.rb', line 803 def playlist_is_in_list(playlist_url, filename) (find_hwnd(), WM_COPYDATA, MBC_Playlist_IsInList, pack_s(playlist_url, filename)) end |
#playlist_move_files(playlist_url, from_indices, to_index) ⇒ MBError
926 927 928 929 |
# File 'lib/musicbeeipc.rb', line 926 def playlist_move_files(playlist_url, from_indices, to_index) (find_hwnd(), WM_COPYDATA, MBC_Playlist_MoveFiles, pack_siai(playlist_url, from_indices, to_index)) end |
#playlist_play_now(playlist_url) ⇒ MBError
933 934 935 936 |
# File 'lib/musicbeeipc.rb', line 933 def playlist_play_now(playlist_url) (find_hwnd(), WM_COPYDATA, MBC_Playlist_PlayNow, pack_s(playlist_url)) end |
#playlist_query_files(playlist_url) ⇒ MBError
828 829 830 831 |
# File 'lib/musicbeeipc.rb', line 828 def playlist_query_files(playlist_url) (find_hwnd(), WM_COPYDATA, MBC_Playlist_QueryFiles, pack_s(playlist_url)) end |
#playlist_query_files_ex(playlist_url) ⇒ Array<String>
861 862 863 864 865 866 867 868 869 870 871 872 |
# File 'lib/musicbeeipc.rb', line 861 def playlist_query_files_ex(playlist_url) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Playlist_QueryFilesEx, pack_s(playlist_url)) r = unpack_sa(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#playlist_query_get_all_files ⇒ String
847 848 849 850 851 852 853 854 855 856 857 |
# File 'lib/musicbeeipc.rb', line 847 def playlist_query_get_all_files() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_Playlist_QueryGetAllFiles, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#playlist_query_get_next_file ⇒ String
834 835 836 837 838 839 840 841 842 843 844 |
# File 'lib/musicbeeipc.rb', line 834 def playlist_query_get_next_file() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_Playlist_QueryGetNextFile, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#playlist_query_get_next_playlist ⇒ String
814 815 816 817 818 819 820 821 822 823 824 |
# File 'lib/musicbeeipc.rb', line 814 def playlist_query_get_next_playlist() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_Playlist_QueryGetNextPlaylist, 0) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#playlist_query_playlists ⇒ MBError
809 810 811 |
# File 'lib/musicbeeipc.rb', line 809 def playlist_query_playlists() (find_hwnd(), WM_USER, MBC_Playlist_QueryPlaylists, 0) end |
#playlist_remove_at(playlist_url, index) ⇒ MBError
917 918 919 920 |
# File 'lib/musicbeeipc.rb', line 917 def playlist_remove_at(playlist_url, index) (find_hwnd(), WM_COPYDATA, MBC_Playlist_RemoveAt, pack_si(playlist_url, index)) end |
#playlist_set_files(playlist_url, filenames) ⇒ MBError
901 902 903 904 |
# File 'lib/musicbeeipc.rb', line 901 def playlist_set_files(playlist_url, filenames) (find_hwnd(), WM_COPYDATA, MBC_Playlist_SetFiles, pack_ssa(playlist_url, filenames)) end |
#position ⇒ int
118 119 120 |
# File 'lib/musicbeeipc.rb', line 118 def position (find_hwnd(), WM_USER, MBC_GetPosition, 0) end |
#position=(position) ⇒ Object
123 124 125 |
# File 'lib/musicbeeipc.rb', line 123 def position=(position) (find_hwnd(), WM_USER, MBC_SetPosition, position) end |
#previous_track ⇒ MBError
50 51 52 |
# File 'lib/musicbeeipc.rb', line 50 def previous_track() (find_hwnd(), WM_USER, MBC_PreviousTrack, 0) end |
#probe ⇒ bool
20 21 22 |
# File 'lib/musicbeeipc.rb', line 20 def probe() (find_hwnd(), WM_USER, MBC_Probe, 0) != MBE_Error end |
#queue_last(fileurl) ⇒ MBError
540 541 542 |
# File 'lib/musicbeeipc.rb', line 540 def queue_last(fileurl) (find_hwnd(), WM_COPYDATA, MBC_QueueLast, pack_s(fileurl)) end |
#queue_next(fileurl) ⇒ MBError
534 535 536 |
# File 'lib/musicbeeipc.rb', line 534 def queue_next(fileurl) (find_hwnd(), WM_COPYDATA, MBC_QueueNext, pack_s(fileurl)) end |
#queue_random_tracks ⇒ MBError
316 317 318 |
# File 'lib/musicbeeipc.rb', line 316 def queue_random_tracks() (find_hwnd(), WM_USER, MBC_QueueRandomTracks, count) end |
#remove_at(index) ⇒ MBError
551 552 553 |
# File 'lib/musicbeeipc.rb', line 551 def remove_at(index) (find_hwnd(), WM_USER, MBC_RemoveAt, index) end |
#search(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ Array<String>
599 600 601 602 603 604 605 606 607 608 609 610 611 |
# File 'lib/musicbeeipc.rb', line 599 def search(query, comparison="Contains", fields=["ArtistPeople", "Title", "Album"]) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Search, pack_sssa(query, comparison, fields)) r = unpack_sa(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#search_and_play_first(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ MBError
663 664 665 666 667 |
# File 'lib/musicbeeipc.rb', line 663 def search_and_play_first(query, comparison="Contains", fields=["ArtistPeople", "Title", "Album"]) (find_hwnd(), WM_COPYDATA, MBC_SearchAndPlayFirst, pack_sssa(query, comparison, fields)) end |
#search_first(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ String
617 618 619 620 621 622 623 624 625 626 627 628 629 |
# File 'lib/musicbeeipc.rb', line 617 def search_first(query, comparison="Contains", fields=["ArtistPeople", "Title", "Album"]) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_SearchFirst, pack_sssa(query, comparison, fields)) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#search_first_index(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ int
653 654 655 656 657 |
# File 'lib/musicbeeipc.rb', line 653 def search_first_index(query, comparison="Contains", fields=["ArtistPeople", "Title", "Album"]) (find_hwnd(), WM_COPYDATA, MBC_SearchFirstIndex, pack_sssa(query, comparison, fields)) end |
#search_indices(query, comparison = "Contains", fields = ["ArtistPeople", "Title", "Album"]) ⇒ Array<int>
635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'lib/musicbeeipc.rb', line 635 def search_indices(query, comparison="Contains", fields=["ArtistPeople", "Title", "Album"]) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_SearchIndices, pack_sssa(query, comparison, fields)) r = unpack_ia(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#set_crossfade(crossfade) ⇒ MBError
299 300 301 |
# File 'lib/musicbeeipc.rb', line 299 def set_crossfade(crossfade) (find_hwnd(), WM_USER, MBC_SetCrossfade, to_i(crossfade)) end |
#set_dsp_enabled(enabled) ⇒ MBError
255 256 257 |
# File 'lib/musicbeeipc.rb', line 255 def set_dsp_enabled(enabled) (find_hwnd(), WM_USER, MBC_SetDspEnabled, to_i(enabled)) end |
#set_equalizer_enabled(enabled) ⇒ MBError
244 245 246 |
# File 'lib/musicbeeipc.rb', line 244 def set_equalizer_enabled(enabled) (find_hwnd(), WM_USER, MBC_SetEqualizerEnabled, to_i(enabled)) end |
#set_mute(mute) ⇒ MBError
211 212 213 |
# File 'lib/musicbeeipc.rb', line 211 def set_mute(mute) (find_hwnd(), WM_USER, MBC_SetMute, to_i(mute)) end |
#set_position(position) ⇒ MBError
113 114 115 |
# File 'lib/musicbeeipc.rb', line 113 def set_position(position) (find_hwnd(), WM_USER, MBC_SetPosition, position) end |
#set_repeat(repeat) ⇒ MBError
233 234 235 |
# File 'lib/musicbeeipc.rb', line 233 def set_repeat(repeat) (find_hwnd(), WM_USER, MBC_SetRepeat, repeat) end |
#set_replay_gain_mode(mode) ⇒ MBError
310 311 312 |
# File 'lib/musicbeeipc.rb', line 310 def set_replay_gain_mode(mode) (find_hwnd(), WM_USER, MBC_SetReplayGainMode, mode) end |
#set_scrobble_enabled(enabled) ⇒ MBError
266 267 268 |
# File 'lib/musicbeeipc.rb', line 266 def set_scrobble_enabled(enabled) (find_hwnd(), WM_USER, MBC_SetScrobbleEnabled, to_i(enabled)) end |
#set_shuffle(shuffle) ⇒ MBError
222 223 224 |
# File 'lib/musicbeeipc.rb', line 222 def set_shuffle(shuffle) (find_hwnd(), WM_USER, MBC_SetShuffle, to_i(shuffle)) end |
#set_stop_after_current_enabled(enabled) ⇒ bool
287 288 289 290 |
# File 'lib/musicbeeipc.rb', line 287 def set_stop_after_current_enabled(enabled) (find_hwnd(), WM_USER, MBC_SetStopAfterCurrentEnabled, to_i(enabled)) end |
#set_volume(volume) ⇒ MBError
Volume - Value between 0 - 100
136 137 138 |
# File 'lib/musicbeeipc.rb', line 136 def set_volume(volume) (find_hwnd(), WM_USER, MBC_SetVolume, volume) end |
#set_volumef(volume) ⇒ MBError
Floating point volume - Value between 0.0 - 1.0
186 187 188 189 |
# File 'lib/musicbeeipc.rb', line 186 def set_volumef(volume) (find_hwnd(), WM_USER, MBC_SetVolumef, FloatInt.new(f:volume)[:i]) end |
#set_volumep(volume) ⇒ MBError
Precise volume - Value between 0 - 10000
161 162 163 |
# File 'lib/musicbeeipc.rb', line 161 def set_volumep(volume) (find_hwnd(), WM_USER, MBC_SetVolumep, volume) end |
#setting_get_data_type(field) ⇒ MBDataType
1285 1286 1287 |
# File 'lib/musicbeeipc.rb', line 1285 def setting_get_data_type(field) (find_hwnd(), WM_USER, MBC_Setting_GetDataType, field) end |
#setting_get_field_name(field) ⇒ String
1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 |
# File 'lib/musicbeeipc.rb', line 1271 def setting_get_field_name(field) hwnd = find_hwnd() lr = (hwnd, WM_COPYDATA, MBC_Setting_GetFieldName, field) r = unpack_s(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#show_equalizer ⇒ MBError
271 272 273 |
# File 'lib/musicbeeipc.rb', line 271 def show_equalizer() (find_hwnd(), WM_USER, MBC_ShowEqualiser, 0) end |
#show_now_playing_assistant ⇒ MBError
564 565 566 |
# File 'lib/musicbeeipc.rb', line 564 def () (find_hwnd(), WM_USER, , 0) end |
#start_auto_dj ⇒ MBError
60 61 62 |
# File 'lib/musicbeeipc.rb', line 60 def start_auto_dj() (find_hwnd(), WM_USER, MBC_StartAutoDj, 0) end |
#stop ⇒ MBError
40 41 42 |
# File 'lib/musicbeeipc.rb', line 40 def stop() (find_hwnd(), WM_USER, MBC_Stop, 0) end |
#stop_after_current ⇒ MBError
45 46 47 |
# File 'lib/musicbeeipc.rb', line 45 def stop_after_current() (find_hwnd(), WM_USER, MBC_StopAfterCurrent, 0) end |
#test ⇒ MBError
1432 1433 1434 |
# File 'lib/musicbeeipc.rb', line 1432 def test() (find_hwnd(), WM_USER, MBC_Test, 0) end |
#to_byte_array(str) ⇒ Array<uint8>
Converts returned String to byte array
1455 1456 1457 |
# File 'lib/musicbeeipc.rb', line 1455 def to_byte_array(str) str.encode("UTF-16LE").force_encoding("BINARY").unpack("C*") end |
#to_bytes(str) ⇒ String
Converts returned String to bytes
1448 1449 1450 |
# File 'lib/musicbeeipc.rb', line 1448 def to_bytes(str) str.encode("UTF-16LE").force_encoding("BINARY") end |
#volume ⇒ int
Volume - Value between 0 - 100
142 143 144 |
# File 'lib/musicbeeipc.rb', line 142 def volume (find_hwnd(), WM_USER, MBC_GetVolume, 0) end |
#volume=(volume) ⇒ Object
Volume - Value between 0 - 100
148 149 150 |
# File 'lib/musicbeeipc.rb', line 148 def volume=(volume) (find_hwnd(), WM_USER, MBC_SetVolume, volume) end |
#volumef ⇒ float
Floating point volume - Value between 0.0 - 1.0
193 194 195 |
# File 'lib/musicbeeipc.rb', line 193 def volumef FloatInt.new(i:(find_hwnd(), WM_USER, MBC_GetVolumef, 0))[:f] end |
#volumef=(volume) ⇒ Object
Floating point volume - Value between 0.0 - 1.0
199 200 201 202 |
# File 'lib/musicbeeipc.rb', line 199 def volumef=(volume) (find_hwnd(), WM_USER, MBC_SetVolumef, FloatInt.new(f:volume)[:i]) end |
#volumep ⇒ int
Precise volume - Value between 0 - 10000
167 168 169 |
# File 'lib/musicbeeipc.rb', line 167 def volumep (find_hwnd(), WM_USER, MBC_GetVolumep, 0) end |
#volumep=(volume) ⇒ Object
Precise volume - Value between 0 - 10000
173 174 175 |
# File 'lib/musicbeeipc.rb', line 173 def volumep=(volume) (find_hwnd(), WM_USER, MBC_SetVolumep, volume) end |
#window_bring_to_front ⇒ MBError
1336 1337 1338 |
# File 'lib/musicbeeipc.rb', line 1336 def window_bring_to_front() (find_hwnd(), WM_USER, MBC_Window_BringToFront, 0) end |
#window_close ⇒ MBError
1302 1303 1304 |
# File 'lib/musicbeeipc.rb', line 1302 def window_close() (find_hwnd(), WM_USER, MBC_Window_Close, 0) end |
#window_get_handle ⇒ HWND (long)
1292 1293 1294 |
# File 'lib/musicbeeipc.rb', line 1292 def window_get_handle() (find_hwnd(), WM_USER, MBC_Window_GetHandle, 0) end |
#window_get_handle_ptr ⇒ HWND (pointer)
1297 1298 1299 |
# File 'lib/musicbeeipc.rb', line 1297 def window_get_handle_ptr() (find_hwnd(), WM_USER, MBC_Window_GetHandle, 0) end |
#window_get_position ⇒ Array<int>
1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 |
# File 'lib/musicbeeipc.rb', line 1341 def window_get_position() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_Window_GetPosition, 0) r = unpack_ii(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#window_get_size ⇒ Array<int>
1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 |
# File 'lib/musicbeeipc.rb', line 1354 def window_get_size() hwnd = find_hwnd() lr = (hwnd, WM_USER, MBC_Window_GetSize, 0) r = unpack_ii(lr) (hwnd, WM_USER, MBC_FreeLRESULT, lr) r end |
#window_maximize ⇒ MBError
1317 1318 1319 |
# File 'lib/musicbeeipc.rb', line 1317 def window_maximize() (find_hwnd(), WM_USER, MBC_Window_Maximize, 0) end |
#window_minimize ⇒ MBError
1312 1313 1314 |
# File 'lib/musicbeeipc.rb', line 1312 def window_minimize() (find_hwnd(), WM_USER, MBC_Window_Minimize, 0) end |
#window_move ⇒ MBError
1324 1325 1326 |
# File 'lib/musicbeeipc.rb', line 1324 def window_move() (find_hwnd(), WM_USER, MBC_Window_Move, pack_i(x, y)) end |
#window_resize ⇒ MBError
1331 1332 1333 |
# File 'lib/musicbeeipc.rb', line 1331 def window_resize() (find_hwnd(), WM_USER, MBC_Window_Resize, pack_i(w, h)) end |
#window_restore ⇒ MBError
1307 1308 1309 |
# File 'lib/musicbeeipc.rb', line 1307 def window_restore() (find_hwnd(), WM_USER, MBC_Window_Restore, 0) end |