I used the 2016-17 NBA and NCAA (click download PDF) rulebooks, and the 2012-13 Iowa HSAA rulebook (apparently the NFHS rulebook is now pay protected????)
The closest definitive rule in American rulebooks appears to be on "disconcerting" during free throws. The NCAA and NFHS rulebooks only mention the term, but the NBA goes on to detail it:
9.I.f: During all free throw attempts, no opponent in the game shall disconcert the shooter
once the ball is placed at his disposal. The following are acts of disconcertion:
(1) Raising his arms when positioned on the lane line on a free throw which will not
remain in play,
(2) Waving his arms or making a sudden movement when in the visual field of the
shooter during any free throw attempt,
(3) Talking to the free throw shooter or talking in a loud disruptive manner during
any free throw attempt.
(4) Entering the lane and continuing to move during any free throw attempt.
For completeness,
NCAA 9-1-f: After the ball is placed at the disposal of a
free-thrower it is a violation when:
An opponent disconcerts (e.g., taunt, bait, gesture or delay) the free-thrower.
Iowa 9-1-3-c: No opponent shall disconcert the free thrower.
But that's only free throws. As to shooting itself... funny enough, there's more clarity on another form of distraction that is often uncalled or not known about:
NCAA: 10-4-a: A technical foul shall be assessed to a player
or a substitute for purposely obstructing an opponent’s vision
by waving or placing hand(s) near his eyes.
And similarly:
NBA: 12A-V-m: Eye guarding (placing a hand in front of the
opponent’s eyes when guarding from the rear) a player who does not
have possession of the ball is illegal and an unsportsmanlike
technical shall be assessed.
Iowa 10-3-6-d: Purposely obstructing an opponent’s vision by waving or
placing hand(s) near his/her eyes. NOTE: Purposely diverting an
opponent’s attention by waving is different than holding or
waving the hands near the opponent’s eyes for the express
purpose of obstructing the vision so that he/she cannot see.
But while there is no rule or any mention of yelling in the book, there is some leeway built into all three rulebooks:
NBA: 12.V: Conduct a. An official may assess a technical foul, without
prior warning, at any time. A technical foul(s) may be assessed to
any player on the court or anyone seated on the bench for conduct
which, in the opinion of an official, is detrimental to the game. The
technical foul must be charged to an individual. A technical foul
cannot be assessed for physical contact when the ball is alive
NCAA: 10-3-1: A player or substitute committing an unsportsmanlike act
including, but not limited to...
NHFS: 10-3-6: A player shall not commit an unsporting foul. This
includes, but is not limited to... (An unsporting foul is a noncontact
technical foul which consists of unfair, unethical, dishonorable
conduct or any behavior not in accordance with the spirit of fair
play.)
Reading some threads on officiating message boards, these sportsmanship grey areas (and a couple separate rules) have been used by some to make calls (even one mention by a FIBA referee)... but it's certainly is debated heavily. Even what counts as disconcertion on free throws gets plenty of argument. Here are some of the better threads: 1 2 3. Others devolved more significantly.
Unfortunately I don't think you're going to find a truly definitive answer. Which is a pity. Games often evolve into what they aren't supposed to be (as do many things in life). And definitive rules to prevent that can be tough to delineate.